BudgetExceededError
Thrown when the session cost limit is exceeded (if onLimit: "error").
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BudgetExceededError(
cost,limit):BudgetExceededError
Parameters
Section titled “Parameters”number
number
Returns
Section titled “Returns”BudgetExceededError
Overrides
Section titled “Overrides”Properties
Section titled “Properties”cause?
Section titled “cause?”
readonlyoptionalcause?:Error
Original error that caused this one, if any.
Inherited from
Section titled “Inherited from”code:
string
Machine-readable error code (e.g., “ABORT”, “RATE_LIMIT”, “TOOL_DENIED”).
Inherited from
Section titled “Inherited from”
readonlycost:number
Accumulated cost in USD at the time of the error.
readonlylimit:number
Configured limit in USD.
retryable
Section titled “retryable”
readonlyretryable:boolean
Whether this error can be retried by retry middleware.