From 8f17cda794c9edc8ec8d284bc773bc9591adf233 Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Mon, 13 Jul 2020 20:40:26 +0200 Subject: [PATCH] use warning error for alias expiration error --- app/api/views/new_custom_alias.py | 4 ++-- app/oauth/views/authorize.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/api/views/new_custom_alias.py b/app/api/views/new_custom_alias.py index 314fe8d5..7f058303 100644 --- a/app/api/views/new_custom_alias.py +++ b/app/api/views/new_custom_alias.py @@ -141,7 +141,7 @@ def new_custom_alias_v2(): try: alias_suffix = signer.unsign(signed_suffix, max_age=600).decode() except SignatureExpired: - LOG.error("Alias creation time expired for %s", user) + LOG.warning("Alias creation time expired for %s", user) return jsonify(error="Alias creation time is expired, please retry"), 412 except Exception: LOG.error("Alias suffix is tampered, user %s", user) @@ -251,7 +251,7 @@ def new_custom_alias_v3(): try: alias_suffix = signer.unsign(signed_suffix, max_age=600).decode() except SignatureExpired: - LOG.error("Alias creation time expired for %s", user) + LOG.warning("Alias creation time expired for %s", user) return jsonify(error="Alias creation time is expired, please retry"), 412 except Exception: LOG.error("Alias suffix is tampered, user %s", user) diff --git a/app/oauth/views/authorize.py b/app/oauth/views/authorize.py index 73574745..af608e3e 100644 --- a/app/oauth/views/authorize.py +++ b/app/oauth/views/authorize.py @@ -156,7 +156,7 @@ def authorize(): try: alias_suffix = signer.unsign(signed_suffix, max_age=600).decode() except SignatureExpired: - LOG.error("Alias creation time expired for %s", current_user) + LOG.warning("Alias creation time expired for %s", current_user) flash("Alias creation time is expired, please retry", "warning") return redirect(request.url) except Exception: