langgenius/dify · error · AccountInFreezeError
account_in_freeze
account_in_freeze
Error message
This email account has been deleted within the past 30 daysand is temporarily unavailable for new account registration.
What it means
Raised at the very top of POST /console/api/login (HTTP 400, code account_in_freeze) when DEPLOYMENT_EDITION is CLOUD and BillingService.is_email_in_freeze(email) returns true. The billing service calls GET /account/in-freeze on the internal billing API; a true response means the email was used by an account deleted within the last 30 days and is blocked from re-registration/login.
Source
Thrown at api/controllers/console/auth/login.py:129
class LoginApi(Resource):
"""Resource for user login."""
@setup_required
@email_password_login_enabled
@console_ns.expect(console_ns.models[LoginPayload.__name__])
@console_ns.response(200, "Success", console_ns.models[SimpleResultOptionalDataResponse.__name__])
@decrypt_password_field
@model_validate(LoginPayload)
def post(self, req_data: LoginPayload):
"""Authenticate user and login."""
request_email = req_data.email
normalized_email = request_email.lower()
if dify_config.DEPLOYMENT_EDITION == DeploymentEdition.CLOUD and BillingService.is_email_in_freeze(
normalized_email
):
_log_console_login_failure(email=normalized_email, reason=LoginFailureReason.ACCOUNT_IN_FREEZE)
raise AccountInFreezeError()
is_login_error_rate_limit = AccountService.is_login_error_rate_limit(normalized_email)
if is_login_error_rate_limit:
_log_console_login_failure(email=normalized_email, reason=LoginFailureReason.LOGIN_RATE_LIMITED)
raise EmailPasswordLoginLimitError()
invite_token = req_data.invite_token
invitation_data: InvitationDetailDict | None = None
if invite_token:
invitation_data = RegisterService.get_invitation_with_case_fallback(
None, request_email, invite_token, session=db.session()
)
if invitation_data is None:
invite_token = None
try:
if invitation_data:
data = invitation_data.get("data", {})View on GitHub (pinned to ef8544b173)
Solutions
- Wait for the 30-day freeze window to elapse, then retry login or registration.
- Contact Dify Cloud support to manually clear the freeze on the email if the deletion was accidental.
- If self-hosted but seeing this, verify DEPLOYMENT_EDITION is not incorrectly set to CLOUD, and confirm the billing service endpoint is reachable and returning correct data.
- Check BillingService.is_email_in_freeze connectivity (the _send_request base URL / auth token) if the freeze state looks wrong.
Example fix
# before
if dify_config.DEPLOYMENT_EDITION == DeploymentEdition.CLOUD and BillingService.is_email_in_freeze(email):
raise AccountInFreezeError()
# after - guard and log the underlying billing lookup for diagnosis
if dify_config.DEPLOYMENT_EDITION == DeploymentEdition.CLOUD:
try:
if BillingService.is_email_in_freeze(normalized_email):
raise AccountInFreezeError()
except Exception:
logger.exception('billing in-freeze check failed for %s', normalized_email) Defensive patterns
Strategy: validation
Validate before calling
# Client-side: if you know the account was recently deleted, skip login
# and tell the user to wait. Server operators can pre-check:
from services.billing_service import BillingService
from configs import dify_config
from enums import DeploymentEdition
def can_attempt_login(email: str) -> bool:
if dify_config.DEPLOYMENT_EDITION == DeploymentEdition.CLOUD:
return not BillingService.is_email_in_freeze(email.lower())
return True Type guard
null
Try / catch
from controllers.console.error import AccountInFreezeError
try:
login(email, password)
except AccountInFreezeError:
inform_user('Email is in a 30-day deletion cooldown; retry later or contact support.') Prevention
- Communicate the 30-day cooldown at account-deletion time so users expect it.
- Keep DEPLOYMENT_EDITION accurate for your install to avoid false freeze checks.
- Monitor BillingService /account/in-freeze error rates; the method swallows exceptions and defaults to not-frozen.
When it happens
Trigger: POST /console/api/login with an email whose corresponding account was deleted less than 30 days ago on Dify Cloud. Only fires when dify_config.DEPLOYMENT_EDITION == DeploymentEdition.CLOUD. The billing service /account/in-freeze endpoint returns data:true.
Common situations: User deleted their Dify Cloud account and immediately tried to log back in or re-register using the same email; test/staging environments pointed at a cloud billing backend where accounts were churned; billing API misconfiguration returning true for emails incorrectly flagged as frozen.
Related errors
AI-assisted analysis of langgenius/dify@ef8544b173 (2026-08-12).
Data as JSON: /api/errors/25dda809b94a5157.
Report an issue: GitHub.