-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: improve timeseries UI + error handling
- distinguish between server error responses (40x/50x responses from the server) and client errors https://www.intricatecloud.io/2020/03/how-to-handle-api-errors-in-your-web-app-using-axios/ - add spinners and loading state - still need to set up timeouts with user feedback for #42 resolves #50
- Loading branch information
Showing
3 changed files
with
51 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
const DEFAULT_TIMEOUT = 10000 | ||
export default function ({ route, $axios, store }) { | ||
$axios.defaults.timeout = DEFAULT_TIMEOUT | ||
$axios.onError((error) => { | ||
store.dispatch('error', error) | ||
}) | ||
} |