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

bad API error message when using a not existing backend #294

Open
bkamin29 opened this issue Nov 3, 2022 · 2 comments
Open

bad API error message when using a not existing backend #294

bkamin29 opened this issue Nov 3, 2022 · 2 comments

Comments

@bkamin29
Copy link

bkamin29 commented Nov 3, 2022

When you use slo-generator in API mode, if you try to compute an SLI with a unknown backend (i mean not specified from the shared configuration), error message from the API is not clear :

Call :

curl -X POST -H "Content-Type: text/x-yaml" --data-binary @sli_get-organization_availability.yaml -H "Authorization: Bearer $(gcloud auth print-identity-token)" https://slo-generator-xxxxxxxx-ew.a.run.app

Answer:

Service Unavailable%         

Log seen from SLO Generator instance:

ERROR - Backend "cloud_monitoring/xxxxxxx" not found in config. Exiting.

maybe the error is not well catched ?

@lvaylet
Copy link
Collaborator

lvaylet commented Nov 3, 2022

Hi @bkamin29,

Thanks for reporting this.

I think the error is caught properly at the SLO Generator level (hence the meaningful error message) but might not be propagated properly to Cloud Run. Unless the Cloud Run error has a different cause? Let me try to reproduce this and get back to you.

@bkamin29
Copy link
Author

Hi @bkamin29,

Thanks for reporting this.

I think the error is caught properly at the SLO Generator level (hence the meaningful error message) but might not be propagated properly to Cloud Run. Unless the Cloud Run error has a different cause? Let me try to reproduce this and get back to you.

aaah, why not, in this case we can reproduce it by using the python module from a laptop ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants