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

Global error callback #19

Open
justincy opened this issue Dec 20, 2016 · 0 comments
Open

Global error callback #19

justincy opened this issue Dec 20, 2016 · 0 comments

Comments

@justincy
Copy link
Contributor

Now that response middleware isn't called for request errors, we need a method for registering a global error callback; i.e. a callback that gets called whenever there's a request error (only network errors, not HTTP errors). Response callbacks would still be called. I can think of two use cases this fulfills:

  1. Logging
  2. If your app, client side, wants to show an error toast whenever there's been a problem instead of each component of the app doing it's own error handling (like many web apps do when your connection is flaky and it's trying to reconnect).
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

1 participant