Include References in InsertResultCommand for all results
Add request.References to InsertResultCommand in both PreprocessingBehavior and PostprocessingBehavior, ensuring references are recorded with both success and error results.
This commit is contained in:
@@ -26,7 +26,8 @@ public class PostprocessingBehavior(IRecDbContext context, ISender sender) : IPi
|
||||
Status = RecStatus.OK,
|
||||
ActionId = request.Action.Id,
|
||||
InfoDetail = info,
|
||||
Type = ResultType.Post
|
||||
Type = ResultType.Post,
|
||||
References = request.References
|
||||
}, cancel);
|
||||
}
|
||||
}
|
||||
@@ -39,7 +40,8 @@ public class PostprocessingBehavior(IRecDbContext context, ISender sender) : IPi
|
||||
Status = RecStatus.Error,
|
||||
ActionId = request.Action.Id,
|
||||
Error = error,
|
||||
Type = ResultType.Post
|
||||
Type = ResultType.Post,
|
||||
References = request.References
|
||||
}, cancel);
|
||||
|
||||
if (request.Action.ErrorAction == ErrorAction.Stop)
|
||||
|
||||
@@ -23,7 +23,8 @@ public class PreprocessingBehavior(IRecDbContext context, ISender sender) : IPip
|
||||
Status = RecStatus.OK,
|
||||
ActionId = request.Action.Id,
|
||||
InfoDetail = JsonSerializer.Serialize(result),
|
||||
Type = ResultType.Pre
|
||||
Type = ResultType.Pre,
|
||||
References = request.References
|
||||
}, cancel);
|
||||
}
|
||||
}
|
||||
@@ -34,7 +35,8 @@ public class PreprocessingBehavior(IRecDbContext context, ISender sender) : IPip
|
||||
Status = RecStatus.Error,
|
||||
ActionId = request.Action.Id,
|
||||
Error = ex.ToString(),
|
||||
Type = ResultType.Pre
|
||||
Type = ResultType.Pre,
|
||||
References = request.References
|
||||
}, cancel);
|
||||
|
||||
if (request.Action.ErrorAction == ErrorAction.Stop)
|
||||
|
||||
Reference in New Issue
Block a user