Standardize service errors with ProblemDetails envelope
This commit is contained in:
@@ -11,7 +11,7 @@ internal sealed class ResultsWorkflowService(AppDbContext db)
|
||||
{
|
||||
var appState = await db.AppState.AsNoTracking().FirstAsync();
|
||||
if (!appState.ResultsOpen)
|
||||
return Results.BadRequest(new { error = "Results are locked until the admin enables them." });
|
||||
return EndpointHelpers.BadRequestError("Results are locked until the admin enables them.");
|
||||
|
||||
var phase = await EndpointHelpers.GetCurrentPhaseAsync(db, player.Id);
|
||||
if (phase != Phase.Results)
|
||||
|
||||
Reference in New Issue
Block a user