Browse Source

add more info in "alias expire" error

Son NK 5 years ago
parent
commit
d9e9a54082

+ 1 - 1
app/api/views/new_custom_alias.py

@@ -124,7 +124,7 @@ def new_custom_alias_v2():
     try:
         alias_suffix = signer.unsign(signed_suffix, max_age=300).decode()
     except SignatureExpired:
-        LOG.error("Alias creation time expired")
+        LOG.error("Alias creation time expired for %s", user)
         return jsonify(error="alias creation is expired, please try again"), 400
     except Exception:
         LOG.error("Alias suffix is tampered, user %s", user)

+ 1 - 1
app/dashboard/views/custom_alias.py

@@ -73,7 +73,7 @@ def custom_alias():
         try:
             alias_suffix = signer.unsign(signed_suffix, max_age=300).decode()
         except SignatureExpired:
-            LOG.error("Alias creation time expired")
+            LOG.error("Alias creation time expired for %s", current_user)
             flash("Alias creation time is expired, please retry", "warning")
             return redirect(url_for("dashboard.custom_alias"))
         except Exception:

+ 1 - 1
app/oauth/views/authorize.py

@@ -156,7 +156,7 @@ def authorize():
                 try:
                     alias_suffix = signer.unsign(signed_suffix, max_age=300).decode()
                 except SignatureExpired:
-                    LOG.error("Alias creation time expired")
+                    LOG.error("Alias creation time expired for %s", current_user)
                     flash("Alias creation time is expired, please retry", "warning")
                     return redirect(request.url)
                 except Exception: