Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inappropriate status code when failed to evaluate alert queries #86107

Open
MingjieZhuEmily opened this issue Apr 15, 2024 · 5 comments
Open
Labels
needs more info Issue needs more information, like query results, dashboard or panel json, grafana version etc

Comments

@MingjieZhuEmily
Copy link

What happened?

500 is returned when Failed to evaluate queries and expressions: failed to execute query A: no handler found for query type ''

What did you expect to happen?

this is not server error, returning 500 is inappropriate

Did this work before?

no

How do we reproduce it?

  1. add a new alert with query that could produce error no handler found for query type
  2. let alert run

Is the bug inside a dashboard panel?

No response

Environment (with versions)?

Grafana:
OS:
Browser:

Grafana platform?

None

Datasource(s)?

No response

@tonypowa
Copy link
Contributor

hi @MingjieZhuEmily
thank you for creating this issue

can you elaborate on the steps to reproduce the issue ("no handler found for query type") ? thank you

@tonypowa tonypowa added the needs more info Issue needs more information, like query results, dashboard or panel json, grafana version etc label May 20, 2024
@MingjieZhuEmily
Copy link
Author

It is the error message when executing a bad query
image

@tonypowa
Copy link
Contributor

Hi @MingjieZhuEmily
Thank you for the screenshot
However, I can't reproduce the same error code using the same data source and in the context of an alert rule configuration.
What is the version of your Grafana instance, and on what platform is it running (docker, binary, cloud, etc) ?
Do you see any relevant Grafana server logs?

@MingjieZhuEmily
Copy link
Author

Now I'm using v10.4.1 and I retried. This issue looks like gone, eval returns 200 though ui shows [sse.dataQueryError] failed to execute query.

@tonypowa
Copy link
Contributor

Perhaps this is a data source related issue despite it happens in Alerting
Could you share the server logs related to the sse.dataQueryError ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info Issue needs more information, like query results, dashboard or panel json, grafana version etc
Projects
None yet
Development

No branches or pull requests

2 participants