Check out 5 Part Formula for Writing Error Messages by Ivan Walsh. Here is an excerpt:
How can we write error message that are both helpful and human?
Error messages fall into three categories: informational, warning, or errors.
Error Message: 5 Part Format
Most messages contain…
The full article is available here.