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.
This commit is contained in:
2026-08-04 20:36:56 +02:00
parent dd9e6a710b
commit 545648fe87

View File

@@ -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",