typicode/fetchival

If a response has a status code of 204, should not attempt to parse the response

Opened this issue · 4 comments

Raises an "Unexpected end of input" error.

I have the same issue when the server returns status code 201

The error in the Firefox developer console is "SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data." But yeah, same problem.

Looks like this was fixed in 07f7f11

I'm noticing that the change in 07f7f11 is not in the minified version (search for "204" and you won't find it). This caused me quite a bit of confusion when I could never duplicate this issue when I tried to debug it with the non-minified version! Could this be resolved?