summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2020-02-18 15:10:41 +0000
committerBrendan Abolivier <babolivier@matrix.org>2020-02-18 15:10:41 +0000
commitbfbe2f5b08857dc845664645b9d4e24fe479d2a0 (patch)
tree76f8c174e8847fb379894c8a6ead957448660357 /synapse/handlers
parentLinters are hard but in they end they just want what's best for us (diff)
downloadsynapse-bfbe2f5b08857dc845664645b9d4e24fe479d2a0.tar.xz
Print the error as an error log and raise the same exception we got
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/acme.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/synapse/handlers/acme.py b/synapse/handlers/acme.py
index e6797535e6..2942df3ac7 100644
--- a/synapse/handlers/acme.py
+++ b/synapse/handlers/acme.py
@@ -22,10 +22,17 @@ from twisted.web import server, static
 from twisted.web.resource import Resource
 
 from synapse.app import check_bind_error
-from synapse.config import ConfigError
 
 logger = logging.getLogger(__name__)
 
+ACME_REGISTER_FAIL_ERROR = """
+Failed to register with the ACME provider. This is likely happening because the install
+is new, and ACME v1 has been deprecated by Let's Encrypt and is disabled for installs set
+up after November 2019.
+At the moment, Synapse doesn't support ACME v2. For more info and alternative solution,
+check out https://github.com/matrix-org/synapse/blob/master/docs/ACME.md#deprecation-of-acme-v1
+------------------------------------------------------"""
+
 
 class AcmeHandler(object):
     def __init__(self, hs):
@@ -76,14 +83,8 @@ class AcmeHandler(object):
         try:
             yield self._issuer._ensure_registered()
         except Exception:
-            raise ConfigError(
-                "Failed to register with the ACME provider. This is likely happening"
-                " because the install is new, and ACME v1 has been deprecated by Let's"
-                " Encrypt and is disabled for installs set up after November 2019. At the"
-                " moment, Synapse doesn't support ACME v2. For more info and alternative"
-                " solution, check out https://github.com/matrix-org/synapse/blob/master"
-                "/docs/ACME.md#deprecation-of-acme-v1"
-            )
+            logger.error(ACME_REGISTER_FAIL_ERROR)
+            raise
 
     @defer.inlineCallbacks
     def provision_certificate(self):