Update the invitation expiry error message so that it is nicer to read.

This commit is contained in:
Rebecca Law
2016-12-07 13:05:38 +00:00
parent 32a21bfd3a
commit f946b022e8

View File

@@ -33,7 +33,9 @@ def get_invited_user_by_token(token):
current_app.config['DANGEROUS_SALT'],
max_age_seconds)
except SignatureExpired:
errors = {'invitation': ['Invitation has expired']}
errors = {'invitation':
['This invitation has expired please contact the person that invited you to invite you again']}
print(errors)
raise InvalidRequest(errors, status_code=400)
invited_user = get_invited_user_by_id(invited_user_id)