error-message-examples: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(pre tags (doh!))
 
(6 intermediate revisions by 2 users not shown)
Line 14: Line 14:


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


* [http://www.mediawiki.org/ MediaWiki] failed login
* [http://www.mediawiki.org/ MediaWiki] failed login
Line 32: Line 34:
  <ul><li>Please enter an amount greater than zero.</li></ul>
  <ul><li>Please enter an amount greater than zero.</li></ul>
  </div></pre>
  </div></pre>
* [http://www.google.com/ Google] apps login error
<pre><div class="errormsg" id="errormsg_0_Passwd">
Username and password do not match. (You provided XXXXXXXXXX)
</div></pre>
* [http://www.technorati.com/ Technorati] login error
<pre><p class="error">Sorry, the member name and password
you entered do not match. Please try again.</p></pre>
* [http://www.yahoo.com/ Yahoo] failed login
<pre><div class="yregertxt"><strong>Invalid ID or password.</strong><br> Please try again.</div></pre>
== 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. [[User:DerrickPallas|DerrickPallas]] 09:31, 14 Jul 2007 (PDT)
** [http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2 401 Unauthorized]
** [http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.3 402 Payment Required]
** [http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4 403 Forbidden]
** [http://www.bodhost.com/web-hosting/index.php/2007/08/10/http-error-codes/ HTTP Status Code Information]
** ...
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]]

Latest revision as of 13:30, 14 August 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