Make an informed decision:
First, look at the server logs to learn the following:
- How many errors occur on the site over a defined period of time?
- How many distinct error codes occur, and how many instances of each code?
- What is the effect of each error code on the user?
By quantifying and qualifying the errors that occur, you can analyze how these errors affect your users. Do a cost/benefit analyis for the errors and determine if managing the error message content is worth while. Only serve specific error messages if there is a compelling business case for it and leave a generic message for the remainder.
Do what makes sense for your use case:
If the error occurs because of something the user has done, and there are alternative actions a user could take in order to complete their task, then it would be imperative for the user's experience and your task completion/conversion rate to provide that information to the user.
If the error occurs because of a system failure, there is nothing the user can do about it, and there is no alternative action(s) a user could take in order to complete their task, then you should explicitly state that the system is unable to process their request.
In the event of system failure, you should give them an estimate of when it will be back up, or point them to a blog and/or twitter feed that they can go to in order to learn more about the nature of the disruption and when it will be back online.
Generally speaking you should have two error pages at minimum:
- One for cases where there is a way out of the dead end.
- One for when there is not.
How you break this down is specific to your use case, so you need to do that analysis and make that decision based on your data.
If your error analysis points to cases that fall under one or the other with enough regularity and with a specific message or path out, then you could consider making a specific error page to handle that. For the long tail of "other" errors, just the generic "try this" or "sorry it is down" error pages would be enough.
It is possible that after the analysis the results would suggest you only need 2-4 error pages. That is not as big a burden as maintaining one for each possible error code. Plus, you could do some traffic analysis to determine if any of the error pages have any measurable effect on conversion rates.
What you don't want to do is misinform your user
Don't tell the user to try something that you know very well due to the error will not result in a conversion. Conversely, you don't want to tell them to give up if they are in fact not at a dead end.