error-message-examples
From Microformats
Error Message Examples
Contributors
- Evan Prodromou (http://evan.prodromou.name/)
Introduction
Examples of error messages published as chunks of readable (X)HTML by Web applications.
Table of Contents
| Table of contents |
Examples
Note that many of these examples are failed logins; they're just the easiest kind of error to generate.
- MediaWiki (http://www.mediawiki.org/) failed login
<div class="errorbox"> <h2>Login error:</h2> Incorrect password or confirmation code entered. Please try again. </div>
- WordPress (http://www.wordpress.com/), failed to enter required fields in comment
<p>Error: please fill the required fields (name, email).</p>
- PayPal (http://www.paypal.com/) , trying to send negative dollars.
<div class="messageBox error"> <p>Some required information is missing or incomplete. Please correct your entries and try again.</p> <ul><li>Please enter an amount greater than zero.</li></ul> </div>
- Google (http://www.google.com/) apps login error
<div class="errormsg" id="errormsg_0_Passwd"> Username and password do not match. (You provided XXXXXXXXXX) </div>
- Technorati (http://www.technorati.com/) login error
<p class="error">Sorry, the member name and password you entered do not match. Please try again.</p>
- Yahoo (http://www.yahoo.com/) failed login
<div class="yregertxt"><strong>Invalid ID or password.</strong><br> Please try again.</div>
Open Questions
- How is this significantly different than the plethora of HTTP status codes? Most of the examples currently on this page are just failed logins. DerrickPallas 09:31, 14 Jul 2007 (PDT)
- 401 Unauthorized (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2)
- 402 Payment Required (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.3)
- 403 Forbidden (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4)
- HTTP Status Code Information (http://www.bodhost.com/web-hosting/index.php/2007/08/10/http-error-codes/)
- ...
I used login errors just because they were easy to generate (see note above). It's actually kind of hard, as a user of these services, to generate a database connection error. Form validation errors are a little easier; I used an example from Paypal. I can go back and try to make some other errors happen, if you like, too.
I think that, first of all, many sites don't return a 4xx or 5xx error code when something goes wrong; they return 200 with an HTML error message as part of the content (often a very small part of the content, wrapped with the site's "skin" of header, footer, and navigational HTML). I think there's a case to be made that the response for a POSTed form with a mis-formatted phone number in it should have a status code of 400 or 409, but that's simply not how most Web sites work.
I also think that even if some Web site is perfectly RESTful and uses the correct HTTP status messages religiously, there's still some value in a specific section of the resulting page that defines the actual error. --Evan 21:28, 17 Jul 2007 (PDT)
