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
This is what happens when I make a failed api request. Are failed api requests supposed to break the app like this? Is there a good way to have a fallback?
The text was updated successfully, but these errors were encountered:
jbhatab
changed the title
Network request failed
Failed API request breaks app
Apr 22, 2015
Can we see your code? I haven't had any problems catching errors from network problems so far.
Here's an example using fetch().
fetch('http://example.com/stuff.json').then(response=>response.json()).then(json=>this._handleResponse(json)).catch(error=>{React.AlertIOS.alert('Error','There seems to be an issue connecting to the network.');});
This is what happens when I make a failed api request. Are failed api requests supposed to break the app like this? Is there a good way to have a fallback?
The text was updated successfully, but these errors were encountered: