Optional ReadonlycodeServer error code as a string (e.g. '4080'), when the failure carries one.
Optional ReadonlyerrorAlias of ChatJobError.code for consumers that branch on errorCode.
Optional ReadonlyerrorServer error type tag (e.g. 'subscription_unavailable'), when present.
Optional ReadonlyfeatureStable machine key for the gated capability, e.g. 'video_4k_render'.
Optional ReadonlyjobIDChat job id the failure belongs to, when known.
Optional ReadonlylimitationStandalone user-facing English describing the limitation.
Optional ReadonlypayloadRaw error payload as received from the server.
Optional ReadonlyrequiredPlans that would satisfy the gated feature, cheapest-first.
Optional ReadonlystatusHTTP status when the failure came from a REST chat endpoint.
Optional Readonlysubscriptiontrue when this failure is a subscription FEATURE-gate denial (4081).
The numeric subscription denial code when this failure is one of the
SUBSCRIPTION_ERROR_CODES (4078 / 4079 / 4080); undefined otherwise.
Error thrown/streamed when a chat/LLM job fails, preserving the server's error contract so apps can branch on machine-readable fields instead of string-matching
.message.messagestays the human-readable server message (unchanged from the plainErrorthis class replaces).code/errorCodecarry the wire error code when present — for jobs submitted withbillingMode: 'subscription', the subscription denial codes fromSUBSCRIPTION_ERROR_CODES('4078'not entitled,'4080'billing-grace renewal retry).errorTypecarries the server's error tag, e.g.'subscription_unavailable'.