summaryrefslogtreecommitdiff
path: root/server/dispatcher.py
diff options
context:
space:
mode:
Diffstat (limited to 'server/dispatcher.py')
-rw-r--r--server/dispatcher.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/server/dispatcher.py b/server/dispatcher.py
index 26216ae..fdec47a 100644
--- a/server/dispatcher.py
+++ b/server/dispatcher.py
@@ -5,11 +5,11 @@ from lib import uuid
class Dispatcher(object):
def validate_uuid(self, uuid4):
if not uuid.validate(uuid4):
- self.error(1, 'Invalid UUID in request')
+ self.error(1, 'Invalid UUID in request: ' + str(uuid4))
def error(self, code, message='An application error occurred'):
raise cherrypy.HTTPError(400,
- self.response({'error': {'code': int(code), 'message': str(message)}})
+ json.dumps({'error': {'code': int(code), 'message': str(message)}})
)
def GET(self, id=None):
@@ -23,3 +23,6 @@ class Dispatcher(object):
def DELETE(self):
raise cherrypy.HTTPError(405)
+
+ def PATCH(self):
+ raise cherrypy.HTTPError(405)