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
When a back-end error occurs inside some endpoints, the server still responds with 200, with the error trace as body.
I last experienced this in #1354: an error was thrown in the signout function and the front-end wasn't aware of it. This was the body of the response:
This kind of error is detected only when the front-end needs to read the response body; otherwise it's just ignored and nothing gets logged to the console since it's a 200 response.
This kind of server error should result in 500 - Internal Server Error responses.
The text was updated successfully, but these errors were encountered:
You are very much right. The status code is checked obviously, since anything else than 200 throws a fetch error, but the Content-Type doesn't seem to be checked before JSON.parse() is called.
When a back-end error occurs inside some endpoints, the server still responds with 200, with the error trace as body.
I last experienced this in #1354: an error was thrown in the
signout
function and the front-end wasn't aware of it. This was the body of the response:This kind of error is detected only when the front-end needs to read the response body; otherwise it's just ignored and nothing gets logged to the console since it's a 200 response.
This kind of server error should result in
500 - Internal Server Error
responses.The text was updated successfully, but these errors were encountered: