diff --git a/mwclient/client.py b/mwclient/client.py
index 2305127d39f85c38ff2a10d28673ed92d4240bdc..c19d178c0528af2e5446cb3ee71d07895b8dd76e 100644
--- a/mwclient/client.py
+++ b/mwclient/client.py
@@ -191,7 +191,7 @@ class Site(object):
         self.hasmsg = 'message' in userinfo
         self.logged_in = 'anon' not in userinfo
         if 'error' in info:
-            if info['error']['code'] in (u'internal_api_error_DBConnectionError', ):
+            if info['error']['code'] in (u'internal_api_error_DBConnectionError', u'internal_api_error_DBQueryError'):
                 self.wait(token)
                 return False
             if '*' in info['error']: