-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve unusual error handling for api/chart/data
I've recently encountered some errors on the dashboard page, within Chart widgets where html is displayed as a result of calling the `api/chart/data` endpoint, and presumably while hitting some 502 / 504s-type error. The error is hard to reproduce, but I'm thinking the approach bellow should improve / prevent that endpoint from ever returning html. Two changes here: - sprinkling the @handle_api_error decorator in critical related views - improving the 500 flask error handler to be a bit smarter, hoping it'll catch some of the problems and return json when expecting it
- Loading branch information
1 parent
514eda8
commit d0d1bf0
Showing
3 changed files
with
12 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters