Custom Node Error Handling - Binary Report for Thrown Errors?

Hi there,

I have a custom node that I have created and I’m curious what my options are for error handling. The node does a function and then for both success and failure, we utilize the binary output to provide an html report to the user stating what happened. It does this similar to the If Node where it has a success and failure output that the user will choose from based on the success of the node. This works great, but the only problem is that the node completes successfully which puts a Green Circle above the node. This is misleading to the user because they think the Node was successful when in reality, the node completed but the return of the function was unsuccessful.

The only other option I see is to throw an error if the function is unsuccessful. This does give a nice Red X above the Node informing the user it was unsuccessful which is great… but then inside the node details, you cannot use a binary report or formatted strings. It just gives you the string you passed into the error.

Is there anyway to have a node finish with the Red X when it is unsuccessful AND provide a Binary Report within the Node details and not just a string?

Here are some pictures to try to illustrate what I am looking for:

Here, a node completes but it is actually unsuccessful, which is misleading to the user:
Node Complete but Unclear Failed
On the other hand, this has a binary report for the failure data which gives the user a lot of info on what happened (once they click Show Binary Data):

We can fix one part of this by throwing an error in the code instead:
Node Complete and Clear Failure
But now we lose the ability to give them a binary report or any kind of response other than a plain string which makes it difficult to provide the user with a useful failure message:

Please let me know if there is a solution/workaround for this and let me know if you have any questions!

Any ideas? I’m only asking this because I’ve gotten a lot of feedback from folks on my team who get confused when the Node fails. :slight_smile:

I am very sorry but that is currently sadly not possible. A node can either run successfully or fail and the error for the fail-case does currently not support any binary data.

So can sadly not solve the problem you are having.

Hi @jan, that is unfortunate but I do appreciate the response!

1 Like