-
Notifications
You must be signed in to change notification settings - Fork 5
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
Convert eventual html GitHub (etc) errors into json for client #133
Comments
Do you mean the GitHub API? Or the metrics server API? |
metrics server api |
@magsout I think we can do that. Let me check and get back to you... |
So we're actually set up to send only json responses. This makes me think that on certain kinds of failure, we must just do a direct transfer of the original github response. Do you happen to have a screenshot or console logs for how this looked when the whole repo was down, @magsout? Now that the calls are working again, I'm not totally sure how to mock a failure to figure out what to catch in the future... 😜 |
If not, it's probably worth setting up a general error handling module like we have in webcompat.com (https://github.com/webcompat/webcompat.com/blob/master/webcompat/error_handlers/__init__.py). |
Due to webcompat/webcompat.com#3118 we get an error on https://webcompat-dashboard.herokuapp.com/triage?direction=desc&sort=created&view=card
But, is it possible for the API to send the error as a JSON response, not html? Not for this endpoint in particular but for all. I can't hand handle HTML response but on only json reponse, that's why I display a generic message.
The text was updated successfully, but these errors were encountered: