Skip to content
This repository was archived by the owner on Dec 19, 2017. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions supercell/requesthandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import time

from schematics.models import Model
from schematics.exceptions import BaseError
from tornado import gen, iostream
from tornado.concurrent import is_future
from tornado.escape import to_unicode
Expand Down Expand Up @@ -136,6 +137,8 @@ def _check_consumer(self):
except NoConsumerFound:
# TODO return available consumer types?!
raise HTTPError(406)
except BaseError as e:
raise HTTPError(400, reason=json.dumps(e.messages))
except Exception as e:
raise HTTPError(400, reason=text_type(e))

Expand Down