How to get alert when SQL Query or Question has an error

Hey,
we have a Dashboard Subscription that would send a slack notification when there is a data result from a Question or SQL query,
but when the SQL query has an error (due to a change in the DB table fields for example) we don't get any notifications from that dashboard subscription,

is there a way to get notified when a question or a SQL query has an error?

thank you

Hi @dhuha
You should receive an error message if you always get results (disabled "Don't send if there aren't results").
Otherwise you would need to setup another alert which looks for a specific question failing. Will quickly get a little complicated.

There's currently no "reverse" builtin:
https://github.com/metabase/metabase/issues/7860 - upvote by clicking :+1: on the first post

Hi @flamber,
I am not sure the ticket you linked exactly address the point here.
There is a difference between "This query returns results" and "This query couldn't run", and I feel @dhuda is asking for alerts on the later. I would be as well.

I would want to use Metabase alerts as part of my monitoring, meaning as an active part of our system, but if we are not warned when a query fails, this becomes a bit unsecure and thus useless.

Thanks for the consideration.

@fgp Subscriptions/Pulses and Alerts are similar, but different, and this topic was for Subscriptions.
You receive errors with Subscriptions. You don't with Alerts, if the trigger is not met.
But it would still require having a way of doing an alert with no result (doesn't matter if it errors or result is null).

Hi,

Thanks for the swift answer and sorry for the confusion.

I'm actually fine with not receiving anything if the trigger is not met - I just have to design my queries with this in mind - but I feel like an SQL error should be treated differently.

I understand there is currently no way to do that ?
Thanks

@fgp The logic in Alerts are a bit different, so that's why it's not even sending the error. There's no workaround for failed queries, unless you use Subscriptions.