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:
2026-04-15 13:33:39 +02:00
parent 42789567f0
commit 859ff5902e
2 changed files with 8 additions and 4 deletions

View File

@@ -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)

View File

@@ -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)