refactor(api): throw on unmapped health status instead of silent NotApplicable fallthrough (#108)
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 4m23s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 5m27s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped

Review finding: NotApplicable is filtered by the handler before mapping,
so a silent ->"info" arm would only mask a missing filter if the mapper
is ever reused unfiltered.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-03 21:18:41 +02:00
co-authored by Claude Fable 5
parent 272174ee75
commit 922bec4b24
+1 -2
View File
@@ -19,7 +19,6 @@ internal static class Mapper
HealthCheckStatus.Fail => "fail",
HealthCheckStatus.Warning => "warn",
HealthCheckStatus.Info => "info",
HealthCheckStatus.NotApplicable => "info",
_ => throw new ArgumentOutOfRangeException(nameof(status))
_ => throw new ArgumentOutOfRangeException(nameof(status), status, null)
};
}