Provide line numbers/stack trace in errors

If there is an error in a JS query, only the error message shows up.

I have a 400+ line JS query and getting "missing ) after argument list" is not as useful as knowing that the error was in line 158 or in function triggerZoomAPI.

2 Likes

Also, this error was driving me crazy because I had no idea why it was happening:

Failed to execute ‘postMessage’ on ‘Window’: # could not be cloned.

It happens if you return a rejected promise in the JS query:

return new Promise((resolve, reject) => {
  reject();
});

1 Like

Hi Nacho! We’ve definitely got some room to improve JS query errors, and I’m hoping we can move more of the errors/logging from the browser console into the preview pane of the query. We’re currently reworking and clarifying the preview behavior of different query types, and I’ll keep this in mind as we work on the preview of JS queries.

1 Like