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

React Native: Does not send exceptions at all #526

Closed
grabbou opened this issue Mar 11, 2016 · 4 comments
Closed

React Native: Does not send exceptions at all #526

grabbou opened this issue Mar 11, 2016 · 4 comments

Comments

@grabbou
Copy link

grabbou commented Mar 11, 2016

On a side note - we should really improve the way we call onError callbacks - without original error or at least request response it's really hard.

Anyway, after putting console.log inside request.onreadystatechange in react-native plugin, I've seen all requests on Android fail with statusCode: 0 and body: "Payload is set but no content-type header specified".

Simply adding:

request.setRequestHeader('Content-type', 'application/json');

fixed the issue and errors started appearing in dashboard immediately.

It seems to me like it's a RN change as it used to work last week before upgrade.

@9mm
Copy link

9mm commented Mar 11, 2016

Interestingly I just ran across this same issue.

@benvinegar
Copy link
Contributor

@grabbou – thanks for your investigation. I've submitted #527 which should address this.

@kushal
Copy link

kushal commented Mar 24, 2016

There's a broader issue here, I think, at least in 0.22. I now have to explicitly supply a Content-type header to fetch(), at least in dev mode, when I did not have to previously and don't have to iOS.

@grabbou
Copy link
Author

grabbou commented Mar 24, 2016

That's already fixed (not sure if pushed), check recent pull requests :)

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

4 participants