summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2022-05-18 20:10:21 +0100
committerGitHub <noreply@github.com>2022-05-18 20:10:21 +0100
commit6ff99e3bea481790782c252c5433e9a88f65c4b0 (patch)
tree685548f93e44862ba6a24eae41661a760145968c
parentFix federation in demo scripts. (#12783) (diff)
downloadsynapse-6ff99e3bea481790782c252c5433e9a88f65c4b0.tar.xz
Downgrade some OIDC exceptions to warnings (#12723)
Diffstat (limited to '')
-rw-r--r--changelog.d/12723.misc1
-rw-r--r--synapse/handlers/oidc.py4
2 files changed, 3 insertions, 2 deletions
diff --git a/changelog.d/12723.misc b/changelog.d/12723.misc
new file mode 100644
index 0000000000..4f5bffeda6
--- /dev/null
+++ b/changelog.d/12723.misc
@@ -0,0 +1 @@
+Downgrade some OIDC errors to warnings in the logs, to reduce the noise of Sentry reports.
diff --git a/synapse/handlers/oidc.py b/synapse/handlers/oidc.py
index f6ffb7d18d..9de61d554f 100644
--- a/synapse/handlers/oidc.py
+++ b/synapse/handlers/oidc.py
@@ -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