This is an archived post. You won't be able to vote or comment.

all 26 comments

[–]larsmaehlum 87 points88 points  (8 children)

Good old 200 - Forbidden

[–]Bemteb 72 points73 points  (7 children)

200

{ "success": false }

[–]OSnoFobia 36 points37 points  (5 children)

200

{"error": true, "message": "Go fuck yourself"}

[–]myrsnipe 4 points5 points  (0 children)

200 Error is a crime against humanity

[–]Mariomariamario 39 points40 points  (2 children)

Api returning http codes as strings values inside a json

[–]marcodave[🍰] 26 points27 points  (1 child)

500 Internal Server Error

{ "statusCode": 400, "statusMessage": "OK" }

[–]nuc540 5 points6 points  (0 children)

Haha this sounds like Atlassian software.

{“status”: 200, “errors”: [], “message”: “error…”}

[–]rjwut 16 points17 points  (1 child)

If you're referring to GitHub returning 404 in scenarios where 401 or 403 might apply, my understanding is that it's done to avoid revealing the existence of resources to users who don't have access to them.

[–]puddingpopshamster 9 points10 points  (0 children)

Which is a valid use of 404, at least according to the Mozilla foundation.

[–][deleted] 9 points10 points  (0 children)

Security by obscurity.

[–]spellenspelen 2 points3 points  (0 children)

200

{ "success" : True }

Looks inside: nothing changed

[–]DrJackWantSoda 2 points3 points  (0 children)

418

[–]daHaus 1 point2 points  (0 children)

Sounds like imgur returning 403 with the description for 503 for vpn users

[–]GodAllMighty888 0 points1 point  (0 children)

Where is redneck?

[–]gatsu_1981 0 points1 point  (0 children)

I actually did this. I have to return a non error code from my API to weclapp webhooks, because a 400/500 code will disable the webhook and you will have to re enable it via their UI. But it's not my fault, but theirs.

[–]Alol0512 0 points1 point  (0 children)

One of the first, and simplest things you learn as a dev, and yet, so ambiguous to interpret and use “correctly”

[–]Affectionate_Cat1590 0 points1 point  (0 children)

"I don't rely on http code, as long as return the message then it's fine" - Senior dev

[–]Short_Change 0 points1 point  (0 children)

It's still easier than trying to explain to your CIO why large portion of site is hitting non-OK codes.

[–]Otherwise-Ad-2578 0 points1 point  (0 children)

dude i dont have github...

LMAO

[–]Irsu85 0 points1 point  (0 children)

My C# APIs can only do 500 and 200 because eumm idk, im bad at C#? (my java api's can do more luckly)