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

Commit

Permalink
Browse files Browse the repository at this point in the history
Add more information on signup-level errors
  • Loading branch information
tdemin committed Jun 7, 2019
1 parent c4bbc6c commit e3660ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions project_amber/handlers/users.py
Expand Up @@ -17,8 +17,8 @@ def signup():
500 otherwise.
"""
if not request.is_json:
raise BadRequest
raise BadRequest("The payload is not valid JSON")
if not "name" in request.json or not "password" in request.json:
raise BadRequest
raise BadRequest("Missing 'name' or 'password'")
addUser(request.json["name"], request.json["password"])
return EMPTY_RESP

0 comments on commit e3660ea

Please sign in to comment.