Function isSubscriptionLimitError

  • Returns true when the argument represents a subscription FEATURE-gate denial (socket error code 4081 / SUBSCRIPTION_ERROR_CODES SUBSCRIPTION_FEATURE_REQUIRES_UPGRADE).

    Accepts the numeric code, the string code, an ErrorData from the render path, or any object carrying the subscriptionLimit discriminator or a code of 4081 (e.g. a ChatJobError, whose code is the string wire value). Anything else — including the other subscription denial codes (4078/4079/4080) — returns false.

    Parameters

    • codeOrError:
          | undefined
          | null
          | string
          | number
          | ErrorData
          | { code?: string
          | number; subscriptionLimit?: boolean }

    Returns boolean