I鈥檓 asking this question in relation to my StackOverflow post, where I noticed that Azure was not failing when nbconvert executes and fails to build a notebook in my repository.
I鈥檓 just wondering, what is the exit code of nbconvert if a cell in a notebook errors out? Does it return a non-zero exit code?
Thank you for taking the time to read, and thanks in advance for your response.
Yes it gives a non-zero exit code. Specifically for cell execution errors it will usually give an exit code of 1.
However, if the kernel in question does not send back an error when an exception occurs (some Spark kernels don't do this), which is against what the spec asks for, then nbconvert doesn't know there was an error. I know of 3 or 4 kernels that behave this way and are mostly unmaintained kernels for which no one is fixing issues anymore.
I'll respond similarly on the SO post.
In the case listed above it did in fact raise the correct error code as far as I can tell. I believe the build script is only looking for an error on the last line of execution given how it is written.
Going to close since the question was answered. Please reopen if there's further discussion needed.