Improve HTTP status info formatting in result views
Replaced the simple status code string with ResultView.FormatHttpStatusInfo for the Info field, providing more descriptive HTTP status information. Added the ReC.Domain.Views namespace import to support this change.
This commit is contained in:
@@ -7,6 +7,7 @@ using ReC.Application.Common.Exceptions;
|
||||
using ReC.Application.Common.Options;
|
||||
using ReC.Application.Results.Commands;
|
||||
using ReC.Domain.Constants;
|
||||
using ReC.Domain.Views;
|
||||
using System.Net;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
@@ -148,7 +149,7 @@ public class InvokeRecActionViewCommandHandler(
|
||||
ActionId = action.Id,
|
||||
Header = JsonSerializer.Serialize(resHeaders, options: new() { WriteIndented = false }),
|
||||
Body = resBody,
|
||||
Info = ((int)response.StatusCode).ToString(),
|
||||
Info = ResultView.FormatHttpStatusInfo(response.StatusCode),
|
||||
Type = ResultType.Main
|
||||
}, cancel);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user