Difference between revisions of "error-message-examples"

From Microformats Wiki
Jump to navigation Jump to search
(It's not just about login errors, they're just the easiest to generate)
Line 56: Line 56:
 
** [http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4 403 Forbidden]
 
** [http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4 403 Forbidden]
 
** ...
 
** ...
 +
 +
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. --[[User:Evan|Evan]] 21:28, 17 Jul 2007 (PDT)
  
 
== See Also ==
 
== See Also ==
  
 
* [[error-message-brainstorming|error message brainstorming]]
 
* [[error-message-brainstorming|error message brainstorming]]

Revision as of 04:28, 18 July 2007

Error Message Examples

Contributors

Introduction

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

Table of Contents

Examples

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.
 </div>
  • 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>
<div class="errormsg" id="errormsg_0_Passwd">
 Username and password do not match. (You provided XXXXXXXXXX)
 </div>
<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