Handling a Custom Code if it fails

Hi @crossm98 , @Jaycee_Lewis ,
easiest option I can see off the top of my head would be to include a step either in the same or in a separate code step to send a JSON payload in order to post a slack message if the original code has failed. Slack has an API so you could post a message to a channel there readily enough. You can find some support for this online: https://stackoverflow.com/questions/50187220/is-there-any-way-to-post-a-webhook-using-javascript
There might be a more elegant solution, if you manage to feed the state into an if/else branching in the workflow and then send a message and finish / continue the rest of your workflow. Use branches in workflows
Cheers,
Matthias