fix(235): make QueueShowScanResult switch total (explicit NotFound + throwing fallback)
Build ErsatzTV Image / Docs update reminder (pull_request) Successful in 6s
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 8m33s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 9m59s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
Build ErsatzTV Image / Docs update reminder (pull_request) Successful in 6s
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 8m33s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 9m59s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
Codex-review Low: NotFound previously reached the catch-all by coincidence; a future enum value would silently 404. Explicit arm + UnreachableException fallback so an unmapped outcome fails loudly rather than mis-mapping to 404. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.Diagnostics;
|
||||
using ErsatzTV.Application.Libraries;
|
||||
using ErsatzTV.Core.Api.Libraries;
|
||||
using ErsatzTV.Core.Interfaces.Repositories;
|
||||
@@ -93,7 +94,8 @@ public class LibrariesController(ITelevisionRepository televisionRepository, IMe
|
||||
Title = "Unable to scan show",
|
||||
Detail = $"The scan for show {request.ShowId} in library {id} could not be completed."
|
||||
}),
|
||||
_ => ApiResults.NotFoundProblem($"Library {id} does not exist.")
|
||||
QueueShowScanResult.NotFound => ApiResults.NotFoundProblem($"Library {id} does not exist."),
|
||||
_ => throw new UnreachableException($"Unmapped QueueShowScanResult: {result}")
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user