[Plugin] auth: Handle exception if data is not json

This commit is contained in:
Ferdinand Thiessen 2020-11-02 15:45:24 +01:00
parent 79c05fa2f4
commit 67fb895cf4
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ def login():
try:
userid = data["userid"]
password = data["password"]
except KeyError:
except (KeyError, ValueError):
raise BadRequest("Missing parameter(s)")
logger.debug("search user {{ {} }} in database".format(userid))