Currently in the onSuccess handler, there is a catch function for reading the JSON response, that tries to read the stream again (via .text()) here.
This causes any possible parsing error to be masked by a TypeError: body stream already read since we are trying to read a stream twice.
The catch function should be refactored to guard against the body already being streamed !response.bodyUsed.