Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into dbkr/send_inviter_…
Browse files Browse the repository at this point in the history
…member_event
  • Loading branch information
dbkr committed Feb 26, 2016
2 parents 354d384 + 9329cd5 commit 413e36b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions synapse/rest/client/v1/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,12 @@ def _parse_json(request):
try:
content = json.loads(request.content.read())
if type(content) != dict:
raise SynapseError(400, "Content must be a JSON object.")
raise SynapseError(
400, "Content must be a JSON object.", errcode=Codes.BAD_JSON
)
return content
except ValueError:
raise SynapseError(400, "Content not JSON.")
raise SynapseError(400, "Content not JSON.", errcode=Codes.NOT_JSON)


def register_servlets(hs, http_server):
Expand Down

0 comments on commit 413e36b

Please sign in to comment.