Standardize InsertResultCommand status and info fields

Updated InsertResultCommand usage to replace QuerySuccess with OK and Failed with Error for status reporting. Changed Info to InfoDetail for both preprocessing and postprocessing behaviors to ensure consistent result and error handling.
This commit is contained in:
2026-04-02 20:36:35 +02:00
parent 1ad7ff3b34
commit 329e441ede
2 changed files with 6 additions and 6 deletions

View File

@@ -23,9 +23,9 @@ public class PostprocessingBehavior(IRecDbContext context, ISender sender) : IPi
await sender.Send(new InsertResultCommand()
{
Status = RecStatus.QuerySuccess,
Status = RecStatus.OK,
ActionId = request.Action.Id,
Info = info,
InfoDetail = info,
Type = ResultType.Post
}, cancel);
}
@@ -36,7 +36,7 @@ public class PostprocessingBehavior(IRecDbContext context, ISender sender) : IPi
await sender.Send(new InsertResultCommand()
{
Status = RecStatus.Failed,
Status = RecStatus.Error,
ActionId = request.Action.Id,
Error = error,
Type = ResultType.Post

View File

@@ -20,9 +20,9 @@ public class PreprocessingBehavior(IRecDbContext context, ISender sender) : IPip
await sender.Send(new InsertResultCommand()
{
Status = RecStatus.QuerySuccess,
Status = RecStatus.OK,
ActionId = request.Action.Id,
Info = JsonSerializer.Serialize(result),
InfoDetail = JsonSerializer.Serialize(result),
Type = ResultType.Pre
}, cancel);
}
@@ -31,7 +31,7 @@ public class PreprocessingBehavior(IRecDbContext context, ISender sender) : IPip
{
await sender.Send(new InsertResultCommand()
{
Status = RecStatus.Failed,
Status = RecStatus.Error,
ActionId = request.Action.Id,
Error = ex.ToString(),
Type = ResultType.Pre