
If parsedURL is a failure, then throw a TypeError.ģ. The new Request(input, init) constructor steps are:Ģ. In the section "Request Class" the new Request(input, init) constructor is a minefield of potential TypeErrors: I haven't listed them here because it would make this answer very long. In the section "Body mixin" if you are using FormData there are several ways to throw a TypeError. If object is disturbed or locked, then throw a TypeError. If keepalive is true, then throw a TypeError. To extract a body and a Content-Type value from object, with an optional boolean keepalive (default false), run these steps: Return the result of getting name from this’s header list.If this’s guard is "immutable", then throw a TypeError.If name is not a name, then throw a TypeError.If header does not contain exactly two items, then throw a TypeError.If object is a sequence, then for each header in object:.To fill a Headers object headers with a given object object, run these steps:


If name is not a name or value is not a value, then throw a TypeError.To append a name/value name/value pair to a Headers object (headers), run these steps: Otherwise, if stream is readable, error stream with a TypeError. To perform an HTTP-network fetch using request with an optional credentials flag, run these steps:ģ. Relevant passages as of January 2021 are below. The Fetch spec lists times when you throw a TypeError from the Fetch API:

I understand this question might have a React-specific cause, but it shows up first in search results for "Typeerror: Failed to fetch" and I wanted to lay out all possible causes here.
