diff --git a/src/ReC.Application/OutResults/Commands/CreateOutResCommand.cs b/src/ReC.Application/OutResults/Commands/CreateOutResCommand.cs index 034bafd..73de95e 100644 --- a/src/ReC.Application/OutResults/Commands/CreateOutResCommand.cs +++ b/src/ReC.Application/OutResults/Commands/CreateOutResCommand.cs @@ -8,6 +8,10 @@ public class CreateOutResCommand : IRequest { public required long ActionId { get; set; } + public short? Status { get; set; } + + public string? Message { get; set; } + public string? Header { get; set; } public string? Body { get; set; } diff --git a/src/ReC.Application/RecActions/Commands/InvokeRecActionCommand.cs b/src/ReC.Application/RecActions/Commands/InvokeRecActionCommand.cs index 7b1934f..98b9b06 100644 --- a/src/ReC.Application/RecActions/Commands/InvokeRecActionCommand.cs +++ b/src/ReC.Application/RecActions/Commands/InvokeRecActionCommand.cs @@ -54,8 +54,11 @@ public class InvokeRecActionCommandHandler( var resBody = await response.Content.ReadAsStringAsync(cancel); var resHeaders = response.Headers.ToDictionary(); + var statusCode = (short)response.StatusCode; + await sender.Send(new CreateOutResCommand { + Status = statusCode, ActionId = action.Id, Header = JsonSerializer.Serialize(resHeaders, options: new() { WriteIndented = false }), Body = resBody,