You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// parse response (falling back to .text() when necessary)if(response.ok){// if "stream", skip parsing entirelyif(parseAs==="stream"){return{data: response.body, response };}return{data: awaitresponse[parseAs](), response };// line 164}
Calling the API with parseAs: 'text', solves the error but I don't know whether it is the correct solution. I feel like this should have been caught by this part of code:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I have a similar problem to issue #1933, I'm calling non-returning API defined like this.
generated schema.d.ts:
calling api:
throws error:
which is in this part of library:
Calling the API with
parseAs: 'text', solves the error but I don't know whether it is the correct solution.I feel like this should have been caught by this part of code:
but this API doesn't have Content-Length response header nor have 204 status
Question
Like I said, I would like to ask for advice, what would be the best approach:
parseAs: 'text'flagBeta Was this translation helpful? Give feedback.
All reactions