summary refs log tree commit diff
path: root/synapse/api/errors.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/api/errors.py')
-rw-r--r--synapse/api/errors.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py
index 6074df292f..cf48829c8b 100644
--- a/synapse/api/errors.py
+++ b/synapse/api/errors.py
@@ -69,9 +69,6 @@ class CodeMessageException(RuntimeError):
         self.code = code
         self.msg = msg
 
-    def error_dict(self):
-        return cs_error(self.msg)
-
 
 class MatrixCodeMessageException(CodeMessageException):
     """An error from a general matrix endpoint, eg. from a proxied Matrix API call.
@@ -308,14 +305,6 @@ class LimitExceededError(SynapseError):
         )
 
 
-def cs_exception(exception):
-    if isinstance(exception, CodeMessageException):
-        return exception.error_dict()
-    else:
-        logger.error("Unknown exception type: %s", type(exception))
-        return {}
-
-
 def cs_error(msg, code=Codes.UNKNOWN, **kwargs):
     """ Utility method for constructing an error response for client-server
     interactions.