views:

91

answers:

3

There are several guidelines for error reporting, that are usually based on giving to the user useful information when he or she does something wrong, but to give this kind of information you need to be handling the error and know that it can happen. There are also tons of articles about designing 404 error pages. But, what can you do when it's a new, unhandled error provoked by a failure in the software?

Are there some guidelines about how to nicely report totally unexpected errors in a web site as an unexpected error 500?

What header message should be shown in that case? something like "Sorry, an unexpected error has ocurred" would be enough?

What information should be given?

Should it have mechanisms to help to report the failure to developers? Which ones?

A: 

What header message should be shown in that case? something like "Sorry, an unexpected error has ocurred" would be enough?

The text should read like "An error occurred and it's your fault!"

What information should be given?

What Information could you give about an unknown error?

Should it have mechanisms to help to report the failure to developers? Which ones?

No! Never report errors nor do logging! I could lead to the ability to fix the error!

x-D

codymanix
seems some people have no sense for sarcasm..
codymanix
+1  A: 

"Sorry, an unexpected error has ocurred" followed by possible tips on how to recover from it (refresh the page/clear cookies/restart browser etc). A link to your bug repository would be helpful to you, but frustrated users need not follow it.

If you plan to automatically report the failure back to your servers, make sure that users are aware of it and they agree with it.

Amarghosh
I agree with the first part of the answer, but not always with the second. Really depends on the type of application and where it is ran. A web site (as the OP is referring to) should never require user permission to report errors back, in my opinion. Neither should corporate applications used internally by a company. The only exception, in my opinion, would be commercial, retail, or freely available software run on a personally owned computer.
joseph.ferris
+1  A: 

First thing to keep in mind when an error happens : do not frighten or confuse your users.

  1. Your error pages should integrate into your site in a seamless way : similar layout, same colors. It should be obvious that this page is part of your site and is a consequence of a previous action.
  2. As Matthew Wilson and codymanix said, you should not be too technical. Error messages must be clear and intelligible. If you do not know where the error comes from, just say it.
  3. If the error happened during a transaction of any kind, you should inform the user about the consequences. If an error interrupts an online order, you should be able to tell if the transaction has been carried out or not.

Now you have told your users something bad happened, it is time to inform the developers about it. There are plenty of solutions around, including :

  1. Custom error log
  2. OS-provided error log (such as Windows' Event Log)
  3. E-mail alerts
Altherac