Răsfoiți Sursa

oauth2 do not throw exception in case server is not reachable

Peter Bieringer 1 an în urmă
părinte
comite
e0d20edbcd
1 a modificat fișierele cu 2 adăugiri și 5 ștergeri
  1. 2 5
      radicale/auth/oauth2.py

+ 2 - 5
radicale/auth/oauth2.py

@@ -61,9 +61,6 @@ class Auth(auth.BaseAuth):
             ):
                 return login
         except OSError as e:
-            raise RuntimeError(
-                "Failed to authenticate against oauth server %r: %s"
-                % (self._endpoint, e)
-            ) from e
-        logger.warning("User %s failed to authenticate" % (str(login)))
+            logger.critical("Failed to authenticate against OAuth2 server %s: %s" % (self._endpoint, e))
+        logger.warning("User failed to authenticate using OAuth2: %r" % login)
         return ""