Is it best practice to have a screen for every individual error state (e.g. 401, 404, 415, 500, etc), or not?

I would argue that users do not care or understand error codes and a simple catch-all page with something to the effect of "Oops! Something went wrong..." is best. With perhaps some exceptions depending on the nature of the site.

2 Answers 2


As you stated in the latter part of the question, catching HTTP errors in a clean, meaningful page is good UX. A stack-trace dump of error messages is scary to most users, and is a potential security risk (as noted by Steve Jones). There are plenty of examples out there, I personally like Google's.

As for multiple error messages, I don't think the page design needs to change at all:

  • Display the error code
  • Display the error reason
  • (Optional) Layman description of what went wrong
  • (Super Optional) Fun image or message to cheer up the user

The same design could work for multiple HTTP errors.

  • Once I had got some ideas from this doc: nngroup.com/articles/improving-dreaded-404-error-message It might interest you too.
    – Kish
    Commented Feb 8, 2018 at 17:59
  • 2
    From a security point of view, I believe it is considered bad practice to leak details like stack traces, raw error messages, etc on user-facing pages. As you say, just keep it simple, perhaps with a note to say that you're aware of the error and are investigating, along with a link to continue working, if appropriate. Commented Feb 12, 2018 at 10:56
  • 1
    @SteveJones Your security point is really interesting.
    – Alan
    Commented Feb 12, 2018 at 12:56
  • I agree with this, and would just add that the top priority (as always) is making sure the user can complete their task with as little friction as possible. So, as long as the messaging is tailored enough to the actual error and where it is in the users' flow.
    – Refe
    Commented Feb 12, 2018 at 15:28

As you mentioned using a similar page layout for all sorts of errors is a better idea. But landing on an error page itself is not a good UX, hence you should add some other elements so that any user, be it a technical or non technical, he can get out of the scenario.

1) Write simple message that is understood by all.

2) Use error code identifiers,and display a message accordingly for better understanding.

3) Provide a CTA or something that would display the complete errorcode as it is(returned by server),so that technical people will solve it (if required) instead of opening the browser console.

4) Also provide wayback buttons to home page or the previous page.

  • What's a CTA? _
    – georgeawg
    Commented May 23, 2019 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.