DEV Community

Discussion on: 200 HTTP Response Abuse

Collapse
 
alainvanhout profile image
Alain Van Hout

I'd wager that it's generally either lack of knowledge and/or lack of motivation, since it's somewhat easier to just add an 'errorMessage' to the DTO and be done with it.

Collapse
 
dendihandian profile image
Dendi Handian

Yes, my assumption is the same as yours. It's either the backend doesn't know how to do it or the frontend doesn't know how to use it. But mostly I believe it's on the backend team.

Collapse
 
alainvanhout profile image
Alain Van Hout

Generally speaking, it's the backend team that makes the API, so then it can only be the backend team that makes that choice. Except of course when the API design is something that has been dictated to them, and isn't open for discussion and improvement. That can unfortunately sometimes be the case.