Refactor exceptions to include profileId context

Refactored `JobException` and derived classes (`InactiveProfileException`, `JobHttpException`, `JobSqlException`) to include `profileId` as a required parameter in their constructors. This ensures consistent context for exceptions related to job execution.

Updated behaviors (`CheckQueryExecutionBehavior`, `MainQueryExecutionBehavior`, `ReCRequestExecutionBehavior`) to use the new constructors, passing `profileId` where applicable. Improved exception messages for better debugging context.

Simplified property initialization and enhanced XML documentation for clarity.
This commit is contained in:
2026-08-03 13:36:42 +02:00
parent eb060aa54e
commit 90916f6d03
7 changed files with 107 additions and 116 deletions

View File

@@ -67,6 +67,7 @@ namespace ECMJobRunner.Application.Profiles.Commands.Behaviors
if (_options.Error.ReCRequest.OnSending == ErrorAction.Stop)
{
throw new JobHttpException(
profileId: command.Job.ProfileId,
jobName: "Triggering DEX",
processName: "ReC Http Request",
batchId: command.BatchId,