You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly, thanks for the awesome library! I've been switching to React from Angular and it's starting to grow on me 😄
I'm trying to inject a custom error message to any fetch that fails without a more specific error message so I don't need to update all my components individually.
Looking at the code, it seems that handleResponse is called as a .then(), meaning if the fetch returns a failed Promise (eg: can't connect to foo.site.com), I have no way of injecting a custom json failure message.
Do you have any suggestions of a workaround? Perhaps handleReponse could also be called on failure?
Thoughts?
The text was updated successfully, but these errors were encountered:
Firstly, thanks for the awesome library! I've been switching to React from Angular and it's starting to grow on me 😄
I'm trying to inject a custom error message to any fetch that fails without a more specific error message so I don't need to update all my components individually.
Looking at the code, it seems that
handleResponse
is called as a.then()
, meaning if thefetch
returns a failedPromise
(eg: can't connect to foo.site.com), I have no way of injecting a custom json failure message.Do you have any suggestions of a workaround? Perhaps
handleReponse
could also be called on failure?Thoughts?
The text was updated successfully, but these errors were encountered: