1

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 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

1 Comment

I agree with you. This isn't my work. But I came through this sort of work recently, hence wanted to hear others' opinions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.