I guess everyone here agrees that the best error message is no error message.
But if it is not avoidable, then it should be easily recognizable and contain:
- the critical information which is a text about the situation (can be both human and technical, depends on the audience)
- ideally an appropriate follow-up action to give useful choices
Google Chrome might be a good example for your needs. Try to load a website in offline modeoffline mode. Additionally, here is an inspiring collection: http://www.flickr.com/groups/web20errorhttps://www.flickr.com/groups/web20error