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:
(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: