mirror of
https://github.com/langgenius/dify.git
synced 2026-05-09 12:59:18 +08:00
[autofix.ci] apply automated fixes
This commit is contained in:
parent
099568f3da
commit
b0138316f0
@ -76,8 +76,7 @@ def create_flask_app_with_configs() -> DifyApp:
|
||||
# build_force_logout_cookie_headers(). Frontend then checks
|
||||
# code === 'unauthorized_and_force_logout' and calls location.reload().
|
||||
raise UnauthorizedAndForceLogout(
|
||||
f"Enterprise license is {license_status}. "
|
||||
"Please contact your administrator."
|
||||
f"Enterprise license is {license_status}. Please contact your administrator."
|
||||
)
|
||||
except UnauthorizedAndForceLogout:
|
||||
raise
|
||||
|
||||
@ -101,10 +101,7 @@ class BaseRequest:
|
||||
# {"message": "..."}
|
||||
# {"detail": "..."}
|
||||
error_message = (
|
||||
error_data.get("message")
|
||||
or error_data.get("error")
|
||||
or error_data.get("detail")
|
||||
or error_message
|
||||
error_data.get("message") or error_data.get("error") or error_data.get("detail") or error_message
|
||||
)
|
||||
except Exception:
|
||||
# If JSON parsing fails, use the default message
|
||||
|
||||
@ -268,4 +268,4 @@ class EnterpriseService:
|
||||
except Exception:
|
||||
logger.exception("Failed to get enterprise license status")
|
||||
|
||||
return None
|
||||
return None
|
||||
|
||||
Loading…
Reference in New Issue
Block a user