From 545648fe87e250b0dde44b7cbf8a834635aa9ad1 Mon Sep 17 00:00:00 2001 From: TekH Date: Tue, 4 Aug 2026 20:36:56 +0200 Subject: [PATCH] Update condition to handle non-zero ReturnValue cases Modified the `else if` condition in `MainQueryExecutionBehavior.cs` to check if `result.ReturnValue` is either not null or not equal to 0. This ensures that the `JobSqlException` is thrown for additional scenarios where `result.ReturnValue` is non-zero, improving error handling and robustness. --- .../Profiles/Commands/Behaviors/MainQueryExecutionBehavior.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ECMJobRunner.Application/Profiles/Commands/Behaviors/MainQueryExecutionBehavior.cs b/ECMJobRunner.Application/Profiles/Commands/Behaviors/MainQueryExecutionBehavior.cs index f2b4f60..d7644f1 100644 --- a/ECMJobRunner.Application/Profiles/Commands/Behaviors/MainQueryExecutionBehavior.cs +++ b/ECMJobRunner.Application/Profiles/Commands/Behaviors/MainQueryExecutionBehavior.cs @@ -78,7 +78,7 @@ namespace ECMJobRunner.Application.Profiles.Commands.Behaviors reason: "Main Query returned nothing.", query: sqlMainQuery, innerException: null); - else if (result.ReturnValue is not null) + else if (result.ReturnValue is not null || result.ReturnValue != 0) throw new JobSqlException( profileId: command.Job.ProfileId, jobName: "Triggering DEX",