Add Error Event Handler to Resource Queries

the Success and Failure Event Handlers are very useful, but there isn't an Error one to simulate catch(err) from try/catch. If you try to run the proxy/dummy query created when you add an Input Query for a module, it will display an error saying "no query provided for <query_name_here>" but the Failure Event Handler isn't triggered (obv the Success one isn't triggered either) so the only way to handle errors seems to be to move the query to a JS Query and code it out, but that's a lot of work just for error handling.

i guess the other solution would be to move the query to a workflow to take advantage of Global Error Handlers, but that adds overhead that could hinder users (make them wait too often and ppl get annoyed or think something broke.... in the worst case they start button mashing queuing up a bunch of queries that end up having to run since you can't cancel a running query. maybe you can w JS if u create a promise w a cancelation token?)

Don't catch the error then? Let it throw and have the defined onFailure handler "catch" the error.

You can also defend against button mashing by debounceing the button that initiates the query.

onFailure handler doesn't seem to catch the error at all. the error seems to occur before the query is actually ran so the query doesn't know it failed. seems like something behind the scene is trying to call the query and it's failing

That is interesting... do you have a minimal example app you could export? I am just now learning / trying to use passed module queries so I am not entirely sure how it all behaves.

testevent.json (9.6 KB)

i do get what the error means. the module doesn't actually know what query will be passed in so it has nothing to run. since there is nowhere to define test data or temporarly assign a local query to act as the passed in query it tries to run a null query.... like make input1_test query, and make that the query that is called when you run input1 so we can mock the flow of things, idk

When you click into the frame to add components, do you not get this? You can defined test inputs

We have a couple of requests on file around module inputs that I think could help solve this! Will follow up if they ship