diff --git a/jupyterhub/services/auth.py b/jupyterhub/services/auth.py index 8e286aa0..743cb185 100644 --- a/jupyterhub/services/auth.py +++ b/jupyterhub/services/auth.py @@ -373,7 +373,11 @@ class HubAuth(SingletonConfigurable): msg = "Failed to check authorization" # pass on error from oauth failure try: - description = r.json().get("error") + description = ( + r.json().get("error") + if r.json().get("error") + else r.json().get("error_description") + ) except Exception: pass else: