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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user