From Microformats Wiki
Jump to navigation Jump to search

Error Message Examples



Examples of error messages published as chunks of readable (X)HTML by Web applications.

Table of Contents


Note that many of these examples are failed logins; they're just the easiest kind of error to generate.

<div class="errorbox">
   <h2>Login error:</h2>
   Incorrect password or confirmation code entered. Please try again.
  • WordPress, failed to enter required fields in comment
<p>Error: please fill the required fields (name, email).</p>
  • PayPal , 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 class="errormsg" id="errormsg_0_Passwd">
 Username and password do not match. (You provided XXXXXXXXXX)
<p class="error">Sorry, the member name and password
 you entered do not match. Please try again.</p>
<div class="yregertxt"><strong>Invalid ID or password.</strong><br> Please try again.</div>

Open Questions

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)

See Also