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

Update README with proper status code handling #57

Merged
merged 1 commit into from
Jun 2, 2018

Conversation

guimeira
Copy link

This example made me spend the last couple of hours trying to figure out why on earth my catch block wasn't being executed when my server returned 404, but according to issue #267, this is the expected behavior. This pull request modifies the example to address this.

@Traviskn
Copy link

Traviskn commented Jun 2, 2018

Thanks!

@Traviskn Traviskn merged commit a3cf145 into joltup:master Jun 2, 2018
@mklb
Copy link

mklb commented Jun 30, 2018

Nice. But I am still figuring out what to do when downloading directly to a path like:

RNFetchBlob
    .config({
      path : XXXX
    })
    .fetch('GET', URL, {
      ...
    })

Would be nice to somehow catch everything that is not 200. currently if my API responds with a 400 and JSON for example the JSON respond gets saved to that location. Which is not the file I wanted of course ;) I do not want to save anything in that case.

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

Successfully merging this pull request may close these issues.

3 participants