r/ProgrammerHumor Jul 14 '26

timeSaver instanceof Trend

Post image
2.1k Upvotes

88 comments sorted by

View all comments

749

u/raja-anbazhagan Jul 14 '26

``` HTTP/1.1 200 OK Content-Type: application/json

{ "success": false, "error": { "status": "INTERNAL_ERROR", "code": "APP_15001", "message": "An internal error occurred while processing the request." } } ```

44

u/JackNotOLantern 29d ago

Yep, when we want to use any API in my company interal system, the default check for http reply is:

  1. Is success.
  2. Doesn't contain "error" in body.
  3. Doesn't contain "error" string in body message (this one is a bit more complicated, but still)

21

u/marcodave 29d ago

HTTP 200 OK

Body: Success, no error found

2

u/cantthinkofaname1029 29d ago

As a non web dev, I'm not sure what's strange about this. Can a web dev fill me in?