DEV Community

Discussion on: Error handling - Returning Results

Collapse
 
courier10pt profile image
Bob van Hoove

In your example I'd consider the http Response similar to a Result object.

Collapse
 
rmorschel profile image
Robert Morschel

There are many REST advocates who suggest only using 200 responses for this very reason, and that HTTP status codes were not intended for REST error semantics.

I just think it's a shame that we can't use the built-in error mechanisms and have to bake our own.

Thread Thread
 
courier10pt profile image
Bob van Hoove

Well we're somewhat on the same page, I very much dislike getting 200 when something is not OK!