Update error message to omit result count in exception

Removed the count of existing results from the BadRequestException
message when invoking rec actions for a batch. The error now simply
states that results are already associated with the batch.
This commit is contained in:
2026-04-16 11:28:46 +02:00
parent c16cb2a1c4
commit 93adaba322

View File

@@ -21,7 +21,7 @@ public class InvokeRecActionViewsCommandHandler(ISender sender, ILogger<InvokeRe
var any = await sender.Send(new AnyResultViewQuery(BatchId: request.References.BatchId), cancel);
if(any)
throw new BadRequestException($"Cannot invoke rec actions for batch {request.References.BatchId} because there are already results associated with it. Count: {any}");
throw new BadRequestException($"Cannot invoke rec actions for batch {request.References.BatchId} because there are already results associated with it.");
var actions = await sender.Send(new ReadRecActionViewQuery() { ProfileId = request.ProfileId }, cancel);