From 329e441ede09dddf3e836cb9676bd69a08fd9234 Mon Sep 17 00:00:00 2001 From: TekH Date: Thu, 2 Apr 2026 20:36:35 +0200 Subject: [PATCH] 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. --- .../Common/Behaviors/InvokeAction/PostprocessingBehavior.cs | 6 +++--- .../Common/Behaviors/InvokeAction/PreprocessingBehavior.cs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ReC.Application/Common/Behaviors/InvokeAction/PostprocessingBehavior.cs b/src/ReC.Application/Common/Behaviors/InvokeAction/PostprocessingBehavior.cs index 716d027..c4ded54 100644 --- a/src/ReC.Application/Common/Behaviors/InvokeAction/PostprocessingBehavior.cs +++ b/src/ReC.Application/Common/Behaviors/InvokeAction/PostprocessingBehavior.cs @@ -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 diff --git a/src/ReC.Application/Common/Behaviors/InvokeAction/PreprocessingBehavior.cs b/src/ReC.Application/Common/Behaviors/InvokeAction/PreprocessingBehavior.cs index f7f16c7..6cc3794 100644 --- a/src/ReC.Application/Common/Behaviors/InvokeAction/PreprocessingBehavior.cs +++ b/src/ReC.Application/Common/Behaviors/InvokeAction/PreprocessingBehavior.cs @@ -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