Closed fritzfr closed 4 years ago
Hi @fritzfr!
Any idea why this might be or if the issue is not with this module? I guess it could also be an implementation issue of fetch within react native android.
Well I have a very limited knowledge of react-native, but I searched for a bit and I think that (indeed) the issue comes from the fetch implementation: https://github.com/facebook/react-native/issues/30055
@elbywan Yes, I found the exact same issue just a few seconds ago. Thanks for your help!
Hey,
I'm encountering a consistency issue on React Native, I'm not sure whether it's an issue of wretch or it's a React Native issue.
Consider the following method:
I'm using a
HEAD
request in this method, which returns thentrue
orfalse
based on the response code. On Android, it always returns false, so I discovered that thenotFound
or thebadRequest
handlers are not being called. The catch block catches:instead of the handlers being called. The server is a remote server (not localhost) and does use SSL (https). I can see the requests coming in on the server and returning 404. On iOS, 404 gets caught by
notFound
as expected.Any idea why this might be or if the issue is not with this module? I guess it could also be an implementation issue of fetch within react native android.