aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_web')
-rw-r--r--python/fatcat_web/auth.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/fatcat_web/auth.py b/python/fatcat_web/auth.py
index 5c8507c1..8e26b7fe 100644
--- a/python/fatcat_web/auth.py
+++ b/python/fatcat_web/auth.py
@@ -22,6 +22,10 @@ def handle_token_login(token):
# TODO: what kind of Exceptions?
app.log.warning("auth fail: MacaroonDeserializationException")
return abort(400)
+ except pymacaroons.exceptions.MacaroonInitException:
+ # TODO: what kind of Exceptions?
+ app.log.warning("auth fail: must supply a valid token")
+ return abort(400)
# extract editor_id
editor_id = None
for caveat in m.first_party_caveats():