Hacker News new | ask | show | jobs
by trollied 1844 days ago
I've often wondered why most sites expose these status codes to the end user. The end user does not need to know, and in most cases will probably be confused by it. Plainly worded messages should be presented in the case of errors, not half an RFC.
2 comments

You can set custom pages for all of those, and they can be helpful and informative.

An Error 500 page used in an internal service could tell you something like "Try again in 5 minutes, and call Joe if it still doesn't work".

An Error 410 page can spell out "We used to have this, but don't anymore because it was obsolete. Please look here for a replacement instead."

The defaults are just that, simple defaults, and these days typically overriden by the web browser to show something more user friendly.

It makes it a ton easier to assist the user when they come to support (“It’s broken” doesn’t go very far, knowing it’s a 500 for instance can help fast track the demand, whatever the actual problem is).

Of course it doesn’t stop you from rendering a nice and plainly worded error.