Enable Friendly Error Messages

A pet peeve of mine has long been the undescriptive errors SharePoint shovels out by default.  You know, when you change a line of code and now your page renders only “An unspecified error has occured”.  Pretty annoying right?

Turns out you can turn these into descriptive error messages which will actually help you identify the problem, what a novel idea.

Turns out I missed Tyler Butler mention this on his great post about his experience recreating his website using Microsoft Office SharePoint Server 2007.

Luckily for me, Andrew Connell brought this to my attention just a few days ago as I was ranting about useless error messages so I figure this deserves it’s own post.

To turn on friendly error messages in your web applications web.config (found via INETPUB).

  • Disable Custom Error Pages by setting this web.config entry:  customErrors=off
  • Enable Stack Traces by adding this property to the SharePoint SafeMode tag also in web.config: CallStack=”true”

Sorry for the lack of braces, my blog is not acting friendly to code display today.  SharePoint Safemode are tags, as is customerrors.

 

 

This entry was posted in SharePoint 2007. Bookmark the permalink.

5 Responses to Enable Friendly Error Messages

  1. Hagrin says:

    Wow, thank you for bringing this to my attention!!! I’m not sure how I missed the two posts that you referred to, but I have been frustrated by the generic error messages from the first day we implemented SharePoint.

  2. shane says:

    I felt the same way when Andrew told me about it.

  3. zti says:

    The term “friendly error messages” is actually sort of confusing the way you’ve used it. It originated in Internet Explorer. There, friendly errors were the generic kind that didn’t tell you anything. They were “friendly” to the user (i.e., non-intimidating) but rather “unfriendly” to developers who wanted to know what the problem is. Now you are using the phrase to describe messages that are friendly to developers but unfriendly to users (the reverse).

  4. Chetan says:

    You folks open to the idea of a google notebook to view resolutions to sharepoint messages?

  5. Pingback: StoverEffect » Blog Archive » SharePoint 2007 (MOSS) or WSS 3.0 Unknown Error Occurred