I have a simple JS query that executes a function and makes no external API calls or does anything else fancy.
If there's an unexpected error or bug in my code (e.g.: null pointer exception, invalid array indexing, etc.), there's no way for me to write a try/catch statement to catch every single one of these (since they are not expected to fail).
However, I want to capture the error message for such failures when they do happen in an event handler so that I can log the error.
Is there a way to propagate the error to and retrieve it in the failure event handler? self.error and self.data.error are both undefined when I try to access the error in either of those.
This is a known bug. We're having the same problem in our retool error monitoring tool as well. We reproduce the error by saving the entire query state + any other global state / vars.
We use this main JS query to prepare failures to be saved
Hi there! Thanks for flagging this. It is something that we're tracking and want to ship a fix for, but I don't have an eta for the fix yet I'll post here if I get any updates