AkA
New Contributor II

Instead of exiting the notebook which make the task/job success, Exception objects needs to be raised again from Exception block to fail the job.

try:

<you code>

except Exception as err:

<your block of exception handling>

raise err