Review the executed procedure to check is it has an "exit 1" to end the process. It is better to use "exit $?" so the real exit code will be returned instead of 1.
If not, check if this exit 1 is acceptable or not to mark the job as failed. It applies to any exit code too.
If the non 0 exit code is acceptable, it needs to be defined on the procedure with the parameter $#ec:<exit-code> and in this case will be $#ec:1
The available parameters can be checked at Procedure parameters