[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot] 2026-03-05 09:02:35 +00:00 committed by GitHub
parent 099568f3da
commit b0138316f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 7 deletions

View File

@ -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

View File

@ -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

View File

@ -268,4 +268,4 @@ class EnterpriseService:
except Exception:
logger.exception("Failed to get enterprise license status")
return None
return None