Update result status handling in InsertResultCommand

Replaced StatusId with Status property in InsertResultCommand, mapping HTTP status codes to application-specific status enums using ToStatus(). Exception handling now sets Status to QueryFailed. Removed usage of StatusId.
This commit is contained in:
2026-03-30 11:22:57 +02:00
parent e9e697fa0d
commit 2b5e63cb45

View File

@@ -146,7 +146,7 @@ public class InvokeRecActionViewCommandHandler(
await sender.Send(new InsertResultCommand() await sender.Send(new InsertResultCommand()
{ {
StatusId = statusCode, Status = response.StatusCode.ToStatus(),
ActionId = action.Id, ActionId = action.Id,
Header = JsonSerializer.Serialize(resHeaders, options: new() { WriteIndented = false }), Header = JsonSerializer.Serialize(resHeaders, options: new() { WriteIndented = false }),
Body = resBody, Body = resBody,
@@ -157,6 +157,7 @@ public class InvokeRecActionViewCommandHandler(
{ {
await sender.Send(new InsertResultCommand() await sender.Send(new InsertResultCommand()
{ {
Status = Status.QueryFailed,
ActionId = action.Id, ActionId = action.Id,
Error = ex.ToString(), Error = ex.ToString(),
Type = ResultType.Main Type = ResultType.Main