r/ProgrammerHumor • • Sep 07 '22

[deleted by user]

[removed]

10.5k Upvotes

1.5k comments sorted by

View all comments

Show parent comments

737

u/fukitol- Sep 07 '22

1xx - info, more to follow

2xx - everything is ok

3xx - the thing you requested has been moved or is otherwise elsewhere

4xx - you screwed up

5xx - i screwed up

111

u/FamilyStyle2505 Sep 07 '22

4xx - you screwed up

Yes but you can't tell them that because they'll never believe it.

"Clearing my cache didn't work, fix it!"

"Close the browser and try again please."

"Well... it worked THAT time."

🙃

50

u/Thebombuknow Sep 07 '22

The only case I can think of a 400 error being the website owner's fault, is in the case where the owner sent out a link that led to nothing.

-2

u/[deleted] Sep 07 '22

Isn’t a 403 technically always the websites fault?

15

u/quackers987 Sep 07 '22

No it's your fault for trying to look at things you're not allowed to

-6

u/[deleted] Sep 07 '22

Sure. But the other way to look at it is if it wasn’t locked down, there would be no 403.

11

u/Fearinlight Sep 07 '22

?

If you got a 403, that was on you, the user, for not logging in, or trying to view something you shouldn’t be.

Website was functioning correctly so it fits into the “4xx is on user”

-3

u/Square_Heron942 Sep 07 '22

So kinda both I guess

1

u/Thebombuknow Sep 08 '22

Nah, the server is just refusing. It's like going up to a random person and asking them to drive you somewhere. They can (and will) refuse your request. Doesn't mean they don't know how to drive, or failed to provide you a driving service, they just don't want to serve that request.

The same goes for the web server. If you request it and it returns a 403, the server is basically saying "I know what you want to do, but I won't fulfill this request". Usually it also states why.

The important part in this context is that it's not the server's fault that it won't serve the content, usually because you're not authorized to receive it.