summary refs log tree commit diff
path: root/synapse/handlers/appservice.py
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2015-01-28 11:59:38 +0000
committerKegan Dougal <kegan@matrix.org>2015-01-28 11:59:38 +0000
commit42876969b99b6bad146b44a734e8d4a1a14d6835 (patch)
tree684c4a5fb105265b8064ab60fdd94d009675e3ce /synapse/handlers/appservice.py
parentRemove unused import (diff)
downloadsynapse-42876969b99b6bad146b44a734e8d4a1a14d6835.tar.xz
Add basic application_services SQL, and hook up parts of the appservice store to read from it.
Diffstat (limited to 'synapse/handlers/appservice.py')
-rw-r--r--synapse/handlers/appservice.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py
index c9f56c41eb..8bd475cbfd 100644
--- a/synapse/handlers/appservice.py
+++ b/synapse/handlers/appservice.py
@@ -16,7 +16,7 @@
 from twisted.internet import defer
 
 from ._base import BaseHandler
-from synapse.api.errors import StoreError, SynapseError
+from synapse.api.errors import Codes, StoreError, SynapseError
 
 import logging
 
@@ -36,11 +36,12 @@ class ApplicationServicesHandler(BaseHandler):
         try:
             stored_service = yield self.store.get_app_service(app_service.token)
             if not stored_service:
-                raise StoreError(404, "Not found")
+                raise StoreError(404, "Application Service Not found")
         except StoreError:
             raise SynapseError(
                 403, "Unrecognised application services token. "
-                "Consult the home server admin."
+                "Consult the home server admin.",
+                errcode=Codes.FORBIDDEN
             )
         # TODO store this AS