views:

85

answers:

5

In a web application on the intranet of a global enterprise, what should it show? What are some best practices or things some of you have learned over the years?

I'm thinking about putting a text field and submit button on the error page that allows the user to automatically submit a help ticket if they need to... It will definitely log the error... what else?

+2  A: 

Have a look at ELMAH. It may well do everything you could possibly want pretty much out of the box :)

Jon Skeet
+1  A: 

We typically log all exceptions. A perfect app shouldn't get into the state where a user sees the error page, so every exception that is unhandled needs to be treated as a potential bug.

I've had some success using hoptoad for exception logging - it groups related exceptions, and gives you the count of each group (preventing duplicate notifications). We also get emails for each exception that includes a stack trace and the exception raised.

You can't wait for a user to tell you there is a problem - you need to know more about your system than they do, and handle bugs when they appear rather than when someone complains about them.

Mr. Matt
A: 

Set up logger to e-mail you errors automatically.

GvS
+1  A: 

Depends on the site, but many sites will just log the error and redirect to the home page (or an error page if you prefer).

For a public site, there isn't usually much point in redirecting to an error page (IMO) since most users wouldn't know what to do with it anyways. For an intranet site though it might make more sense.

Eric Petroelje
+3  A: 

If you are using .Net, get Elmah. (Error Logging Modules and Handlers).

It's opensourced and extremely easy to use.

As a general rule, any exception type errors should be automatically logged and submitted to your bug tracking system. Potentially, they should be emailed to the on call people as well. In other words, don't depend on the users to tell you there is a problem which goes hand in hand with know about it before they call.

If you want, putting a button on each of your web pages that allows the users to submit a ticket is a good idea. Just keep it very simple (one field is good) and allow them to submit for any reason. This info should either be put in front of someone that can make a decision about it as soon as possible, whether that be email or through a help ticket.

You can get a lot of good feedback on things you didn't even think of this way.

Chris Lively