diff options
author | Kegan Dougal <kegan@matrix.org> | 2015-01-28 11:59:38 +0000 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2015-01-28 11:59:38 +0000 |
commit | 42876969b99b6bad146b44a734e8d4a1a14d6835 (patch) | |
tree | 684c4a5fb105265b8064ab60fdd94d009675e3ce /synapse/handlers/appservice.py | |
parent | Remove unused import (diff) | |
download | synapse-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.py | 7 |
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 |