浏览代码

add more info in "alias expire" error

Son NK 5 年之前
父节点
当前提交
d9e9a54082
共有 3 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      app/api/views/new_custom_alias.py
  2. 1 1
      app/dashboard/views/custom_alias.py
  3. 1 1
      app/oauth/views/authorize.py

+ 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: