Best practices for catching errors?

Hello! I’m trying to catch when query X fails and send it to a webhook along with some context (which query failed, and what the error was, ideally also the states of some components / transformers), so I can get notified about it. Is there a best practice way to do this, without creating a separate “error-catching” query (ECQ) for each query X I want to monitor?
I see that queries have an .error property which contains good info. And I can trigger my ECQ whenever X fails. But can ECQ know which query triggered it?
I guess I could create a transformer that aggregates all the .error properties of ALL my queries into a string, and send that with the error message. This seems painful though (would I have to manually type all my queries into this transformer and concatenate them if the .error property != null?)
Is there a better way?
Thank you!

@will — do you have any thoughts on this?

Similar question here, I have an API that is responding with a 200 even though errors exist, I want to catch this in the transformer and make the query “fail”.

1 Like

I’d also like to know