Skip to content
Snippets Groups Projects
Unverified Commit 6ff99e3b authored by David Robertson's avatar David Robertson Committed by GitHub
Browse files

Downgrade some OIDC exceptions to warnings (#12723)

parent a1cb05b3
No related branches found
No related tags found
No related merge requests found
Downgrade some OIDC errors to warnings in the logs, to reduce the noise of Sentry reports.
......@@ -224,7 +224,7 @@ class OidcHandler:
self._sso_handler.render_error(request, "invalid_session", str(e))
return
except MacaroonInvalidSignatureException as e:
logger.exception("Could not verify session for OIDC callback")
logger.warning("Could not verify session for OIDC callback: %s", e)
self._sso_handler.render_error(request, "mismatching_session", str(e))
return
......@@ -827,7 +827,7 @@ class OidcProvider:
logger.debug("Exchanging OAuth2 code for a token")
token = await self._exchange_code(code)
except OidcError as e:
logger.exception("Could not exchange OAuth2 code")
logger.warning("Could not exchange OAuth2 code: %s", e)
self._sso_handler.render_error(request, e.error, e.error_description)
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment