[whatwg/fetch] Fetch throws an error for 301 responses from the server (#1040)

I'm using this module through React-Native-Url-Preview / link-preview-js / cross-fetch so it's hard to follow but ultimately when I pass a URL with a redirect (e.g. "news.bbc.co.uk") I get an error event response through EventTarget.xhr.onerror(fetch.umd.js:474)
I can see in flipper that a 301 has been returned by the site so I'm surprised that that becomes an error event.
This seems to happen to many sites with a 301, though not all. I think the response headers are different though I don't see why any 301 is an error

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1040

Received on Thursday, 18 June 2020 18:00:21 UTC