mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Downgrade some OIDC exceptions to warnings (#12723)
This commit is contained in:
parent
a1cb05b3e8
commit
6ff99e3bea
1
changelog.d/12723.misc
Normal file
1
changelog.d/12723.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
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))
|
self._sso_handler.render_error(request, "invalid_session", str(e))
|
||||||
return
|
return
|
||||||
except MacaroonInvalidSignatureException as e:
|
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))
|
self._sso_handler.render_error(request, "mismatching_session", str(e))
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -827,7 +827,7 @@ class OidcProvider:
|
|||||||
logger.debug("Exchanging OAuth2 code for a token")
|
logger.debug("Exchanging OAuth2 code for a token")
|
||||||
token = await self._exchange_code(code)
|
token = await self._exchange_code(code)
|
||||||
except OidcError as e:
|
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)
|
self._sso_handler.render_error(request, e.error, e.error_description)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user