From 28c96d0d35b8a11897f4298341a89fe28aac991e Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Sat, 11 Jul 2020 19:23:56 +0200 Subject: [PATCH] return 412 when alias ceration time is expired --- app/api/views/new_custom_alias.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/views/new_custom_alias.py b/app/api/views/new_custom_alias.py index c80d6a4f..314fe8d5 100644 --- a/app/api/views/new_custom_alias.py +++ b/app/api/views/new_custom_alias.py @@ -142,7 +142,7 @@ def new_custom_alias_v2(): alias_suffix = signer.unsign(signed_suffix, max_age=600).decode() except SignatureExpired: LOG.error("Alias creation time expired for %s", user) - return jsonify(error="alias creation is expired, please try again"), 400 + return jsonify(error="Alias creation time is expired, please retry"), 412 except Exception: LOG.error("Alias suffix is tampered, user %s", user) return jsonify(error="Tampered suffix"), 400 @@ -252,7 +252,7 @@ def new_custom_alias_v3(): alias_suffix = signer.unsign(signed_suffix, max_age=600).decode() except SignatureExpired: LOG.error("Alias creation time expired for %s", user) - return jsonify(error="alias creation is expired, please try again"), 400 + return jsonify(error="Alias creation time is expired, please retry"), 412 except Exception: LOG.error("Alias suffix is tampered, user %s", user) return jsonify(error="Tampered suffix"), 400