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
The API sends a lot of 200 status codes for things that probably should have a more specific status code - for example, a failed authentication sends a 200 when (i think) it should send a 401.
I believe this is because res.send defaults a 200 if you don't explicitly send a status code, but again I could be misinterpreting this.
This will be helpful on the front end because it allows for a programmatic way to isolate behaviour based on status code responses, something like:
if (error.status === 401) {
logOutUser();
}
The text was updated successfully, but these errors were encountered:
(apologies if this is incorrect)
The API sends a lot of 200 status codes for things that probably should have a more specific status code - for example, a failed authentication sends a 200 when (i think) it should send a 401.
I believe this is because
res.send
defaults a 200 if you don't explicitly send a status code, but again I could be misinterpreting this.This will be helpful on the front end because it allows for a programmatic way to isolate behaviour based on status code responses, something like:
The text was updated successfully, but these errors were encountered: