catch possible TypeError and ValueError from serializer

This commit is contained in:
Jameson
2014-01-23 23:26:18 +00:00
parent 91ee026ff7
commit b2174bf035
+4
View File
@@ -315,6 +315,10 @@ def get_token_status(token, serializer, max_age=None):
expired = True
except BadSignature:
invalid = True
except TypeError:
invalid = True
except ValueError:
invalid = True
if data:
user = _datastore.find_user(id=data[0])