<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -33,6 +33,13 @@ module ActiveCouch
   # 409 Conflict
   class ResourceConflict &lt; ClientError; end # :nodoc:
 
+  # 412 Precondition Failed - this is returned when there is an update conflict (usually means revisions don't match).
+  class UpdateConflict &lt; ClientError # :nodoc:
+    def to_s
+      &quot;Failed with #{response.code} #{response.message if response.respond_to?(:message)}. Body: #{response.body}&quot;
+    end
+  end
+
   # 5xx Server Error
   class ServerError &lt; ConnectionError; end # :nodoc:
 
@@ -113,6 +120,8 @@ module ActiveCouch
             raise(MethodNotAllowed.new(response))
           when 409
             raise(ResourceConflict.new(response))
+          when 412
+            raise(UpdateConflict.new(response))
           when 422
             raise(ResourceInvalid.new(response))
           when 401...500</diff>
      <filename>lib/active_couch/connection.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>bebe639d41c00a007eccfa3f9e9ea0b0fadcfb01</id>
    </parent>
  </parents>
  <author>
    <name>Cheah Chu Yeow</name>
    <email>chuyeow@gmail.com</email>
  </author>
  <url>http://github.com/chuyeow/activecouch/commit/2a4887c5397f78614ca25c38f1b2e1732b60f902</url>
  <id>2a4887c5397f78614ca25c38f1b2e1732b60f902</id>
  <committed-date>2008-12-28T22:18:48-08:00</committed-date>
  <authored-date>2008-12-28T22:18:48-08:00</authored-date>
  <message>Handle HTTP 412 Precondition Failed responses. These occur when there is an update conflict.</message>
  <tree>ef69de5969ef2a51e5c2d2073f62b6bd496e05a3</tree>
  <committer>
    <name>Cheah Chu Yeow</name>
    <email>chuyeow@gmail.com</email>
  </committer>
</commit>
