interface ErrorData {
    code: number;
    feature?: string;
    limitation?: string;
    message: string;
    originalCode?: string;
    requiredPlans?: SubscriptionPlanId[];
    subscriptionLimit?: boolean;
}

Properties

code: number
feature?: string

Stable machine key for the gated capability, e.g. 'video_4k_render'. Branch on this — never parse ErrorData.limitation prose.

limitation?: string

Standalone, user-facing English describing the limitation, suitable for a toast, e.g. '4K video render requires Unlimited Pro'.

message: string
originalCode?: string
requiredPlans?: SubscriptionPlanId[]

Plans that would satisfy the gated feature, cheapest-first. ALWAYS an array when present, e.g. ['unlimited_pro'].

subscriptionLimit?: boolean

Discriminator set to true when this render-path error is a subscription FEATURE-gate denial (socket error code 4081). The four fields below are present only when this is true. Apps can branch on it (or use isSubscriptionLimitError) to show an upgrade prompt instead of a generic error toast.