Using HTTP Status Code 200 on errors responses

Viewed 69

I've seen on some occasions, HTTP responses on errors return in a format like below,

HTTP Status Code : 200

{ "status" : 404,
"message" : "error" }

this makes HTTP status code redundant, so is this acceptable?

Thanks.

1 Answers

In my opinion this will only confuse the people that are working with your API response. Especially if you don't know who will be using that response, you should be very careful. There is no enforcement to follow the HTTP guidelines, but whenever possible you probably should

Related