langgenius/dify · warning · 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 by AccountInFreezeError inside EmailRegisterSendApi.post on Dify CLOUD edition only. BillingService.is_email_in_freeze marks an email as unavailable for new registration for 30 days after the associated account was deleted. This is a deliberate anti-abuse / billing protection, not a transient failure — the same email cannot re-register until the freeze window elapses. Self-hosted (COMMUNITY/EE) deployments never trigger this path because the guard is gated on DEPLOYMENT_EDITION == CLOUD.

Source

Thrown at api/controllers/console/auth/email_register.py:105

    @email_password_login_enabled
    @email_register_enabled
    @console_ns.expect(console_ns.models[EmailRegisterSendPayload.__name__])
    @console_ns.response(200, "Success", console_ns.models[SimpleResultDataResponse.__name__])
    @model_validate(EmailRegisterSendPayload)
    def post(self, req_data: EmailRegisterSendPayload):
        normalized_email = req_data.email.lower()

        ip_address = extract_remote_ip(request)
        if AccountService.is_email_send_ip_limit(ip_address):
            raise EmailSendIpLimitError()
        language = "en-US"
        if req_data.language is not None and req_data.language in languages:
            language = req_data.language

        if dify_config.DEPLOYMENT_EDITION == DeploymentEdition.CLOUD and BillingService.is_email_in_freeze(
            normalized_email
        ):
            raise AccountInFreezeError()

        account = AccountService.get_account_by_email_with_case_fallback(req_data.email, session=db.session())
        token = AccountService.send_email_register_email(email=normalized_email, account=account, language=language)
        return {"result": "success", "data": token}


@console_ns.route("/email-register/validity")
class EmailRegisterCheckApi(Resource):
    @setup_required
    @email_password_login_enabled
    @email_register_enabled
    @console_ns.expect(console_ns.models[EmailRegisterValidityPayload.__name__])
    @console_ns.response(200, "Success", console_ns.models[VerificationTokenResponse.__name__])
    @model_validate(EmailRegisterValidityPayload)
    def post(self, req_data: EmailRegisterValidityPayload):

        user_email = req_data.email.lower()

View on GitHub (pinned to ef8544b173)

Solutions

  1. Register with a different email address, or wait until the 30-day freeze expires.
  2. If this is a legitimate re-registration need on an internal CLOUD instance, have an admin release the email from billing freeze via BillingService.
  3. Confirm DEPLOYMENT_EDITION is intentionally CLOUD; on self-hosted this should be COMMUNITY or EE.
  4. Handle the 'account_in_freeze' code in the UI to show a user-friendly 'try again later' message instead of a generic error.

Example fix

// before: client retries registration immediately on any 400
if (res.status === 400) alert('Registration failed');
// after: branch on the error code
if (res.status === 400 && body.code === 'account_in_freeze') {
  alert('This email is temporarily locked. Try again after 30 days or use another email.');
}
Defensive patterns

Strategy: validation

Validate before calling

// Client cannot query billing freeze directly; validate context instead.
const CLOUD = deploymentEdition === 'CLOUD';
if (CLOUD && recentlyDeletedEmails.has(email.toLowerCase())) {
  showFreezeMessage(email);
  return; // skip the API call
}

Try / catch

// In the API caller
try {
  await emailSend({ email });
} catch (e) {
  if (e.code === 'account_in_freeze') showFreezeMessage();
  else throw e;
}

Prevention

When it happens

Trigger: POST /console/api/email-register/email-send with an email whose account was deleted within the last 30 days, against a CLOUD deployment. The check fires after the IP rate-limit check and before the verification email is sent.

Common situations: User deleted their account and immediately tries to sign up again with the same address; QA/staging on dify.ai cloud reusing an email after deletion; email alias recycling. Not reproducible on self-hosted unless DEPLOYMENT_EDITION is set to CLOUD.

Related errors


AI-assisted analysis of langgenius/dify@ef8544b173 (2026-08-12). Data as JSON: /api/errors/4fcaa59ec56fa476. Report an issue: GitHub.