langgenius/dify · warning

The workspace custom feature has reached the limit of your s

Error message

The workspace custom feature has reached the limit of your subscription.

What it means

HTTP 403 from `cloud_edition_billing_resource_check("workspace_custom")`. When `resource == "workspace_custom"` and `features.can_replace_logo` is false, the decorator aborts with `The workspace custom feature has reached the limit of your subscription.` Restricts workspace branding/logo replacement to plans that include it.

Source

Thrown at api/controllers/console/wraps.py:214

            if features.billing.enabled:
                members = features.members
                apps = features.apps
                documents_upload_quota = features.documents_upload_quota
                annotation_quota_limit = features.annotation_quota_limit
                if resource == "members" and 0 < members.limit <= members.size:
                    abort(403, "The number of members has reached the limit of your subscription.")
                elif resource == "apps" and 0 < apps.limit <= apps.size:
                    abort(403, "The number of apps has reached the limit of your subscription.")
                elif resource == "documents" and 0 < documents_upload_quota.limit <= documents_upload_quota.size:
                    # The api of file upload is used in the multiple places,
                    # so we need to check the source of the request from datasets
                    source = request.args.get("source") or request.form.get("source")
                    if source == "datasets":
                        abort(403, "The number of documents has reached the limit of your subscription.")
                    else:
                        return view(*args, **kwargs)
                elif resource == "workspace_custom" and not features.can_replace_logo:
                    abort(403, "The workspace custom feature has reached the limit of your subscription.")
                elif resource == "annotation" and 0 < annotation_quota_limit.limit < annotation_quota_limit.size:
                    abort(403, "The annotation quota has reached the limit of your subscription.")
                else:
                    return view(*args, **kwargs)

            return view(*args, **kwargs)

        return decorated

    return interceptor


def cloud_edition_billing_knowledge_limit_check[**P, R](
    resource: str,
) -> Callable[[Callable[P, R]], Callable[P, R]]:
    def interceptor(view: Callable[P, R]):
        @wraps(view)
        def decorated(*args: P.args, **kwargs: P.kwargs):

View on GitHub (pinned to ef8544b173)

Solutions

  1. Upgrade to a plan that includes workspace customization.
  2. Gate the branding UI on `features.can_replace_logo` so users cannot trigger the request.
  3. Refresh the features cache after a plan upgrade if the flag still reads false.
  4. Confirm the entitlement is provisioned for the tenant in the billing service.

Example fix

// before
await uploadLogo(file)  // 403 on plans without branding
// after
const { can_replace_logo } = await getFeatures()
if (!can_replace_logo) alert('Workspace branding requires a paid plan.')
else await uploadLogo(file)
Defensive patterns

Strategy: validation

Validate before calling

from services.feature_service import FeatureService

_, tenant_id = current_account_with_tenant()
features = FeatureService.get_features(tenant_id, exclude_vector_space=True)

def can_brand() -> bool:
    return bool(features.can_replace_logo)

if not can_brand():
    # hide branding UI / show upgrade CTA
    ...

Type guard

def branding_enabled(can_replace_logo: bool | None) -> bool:
    return bool(can_replace_logo)

Try / catch

try:
    resp = client.post("/workspace/customize/logo", ...)
except HTTPError as err:
    if err.response.status_code == 403 and "workspace custom" in err.response.text:
        # branding entitlement missing — upgrade plan
        ...
    raise

Prevention

When it happens

Trigger: Calling a workspace-customization route (e.g. logo replacement) on a plan whose `FeatureService.get_features(...).can_replace_logo` flag is false.

Common situations: Free/starter plan without branding entitlement; trial of branding expired; features cache stale so `can_replace_logo` reads false after an upgrade.

Related errors


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