diff --git a/Database/Persist/MongoDB.hs b/Database/Persist/MongoDB.hs
--- a/Database/Persist/MongoDB.hs
+++ b/Database/Persist/MongoDB.hs
@@ -45,6 +45,7 @@
     , Connection
     , MongoConf (..)
     , MongoBackend
+    , MongoAuth (..)
     -- ** using raw MongoDB pipes
     , PipePool
     , createMongoDBPipePool
@@ -353,11 +354,13 @@
      "query" DB.:= DB.Doc [_id DB.:= DB.ObjId objectId],
      "update" DB.:= DB.Doc updates
    ]
-  return $ case DB.lookup "err" (DB.at "lastErrorObject" result) result of
-    Just e -> Left e
+  return $ case findErr result of
     Nothing -> case DB.lookup "value" result of
       Nothing -> Left "no value field"
       Just doc -> Right doc
+    Just e -> Left e
+    where
+      findErr result = DB.lookup "err" (DB.at "lastErrorObject" result)
 
 instance (Applicative m, Functor m, Trans.MonadIO m, MonadBaseControl IO m) => PersistQuery (DB.Action m) where
     update _ [] = return ()
diff --git a/persistent-mongoDB.cabal b/persistent-mongoDB.cabal
--- a/persistent-mongoDB.cabal
+++ b/persistent-mongoDB.cabal
@@ -1,5 +1,5 @@
 name:            persistent-mongoDB
-version:         1.1.5.2
+version:         1.1.6
 license:         MIT
 license-file:    LICENSE
 author:          Greg Weber <greg@gregweber.info>
