Hacker News new | ask | show | jobs
by vsnf 1379 days ago
> just as I would not suggest sending a 404 response code that also has the "real data" in it for whatever reason.

Do you mean to suggest that you advocate for an everything-is-200-OK design and the client should be checking for an error object there?

1 comments

"Don't do something really stupid."

"Do you mean to suggest that people should do this other stupid thing then?"

Come on.

There's no reason for you to hold that opinion so strongly.

There's nothing inherently wrong with having a 200 for everything with a standard body structure, and there's nothing wrong with having a GET request with a body.

Where things go off the rails is strictly adhering to a specific thing without understanding the advantages and disadvantages of other approaches.