@lelantos-org/sdk / core/errors / X402PaymentError
Class: X402PaymentError โ
Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:220
An x402 payment could not be made. Callers branch on reason: a budget-exceeded is a policy stop the agent should surface to its operator, while no-acceptable-requirements means this server cannot be paid by this wallet.
Extends โ
WalletError<"X402_PAYMENT">
Constructors โ
Constructor โ
new X402PaymentError(
reason,
message,
opts?
): X402PaymentError;Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:224
Parameters โ
| Parameter | Type |
|---|---|
reason | X402RefusalReason |
message | string |
opts? | WalletErrorOptions & object |
Returns โ
X402PaymentError
Overrides โ
Properties โ
cause? โ
optional cause?: unknown;Defined in: typescript/lib/lib.es2022.error.d.ts:26
Inherited from โ
code โ
readonly code: "X402_PAYMENT";Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:42
Inherited from โ
context โ
readonly context: ErrorContext;Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:43
Inherited from โ
message โ
message: string;Defined in: typescript/lib/lib.es5.d.ts:1077
Inherited from โ
name โ
name: string;Defined in: typescript/lib/lib.es5.d.ts:1076
Inherited from โ
reason โ
readonly reason: X402RefusalReason;Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:221
resource? โ
readonly optional resource?: string;Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:223
Resource URL the payment was for, when known.
stack? โ
optional stack?: string;Defined in: typescript/lib/lib.es5.d.ts:1078
Inherited from โ
Methods โ
withContext() โ
withContext(extra): this;Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:46
Merge additional context in place and return this for rethrowing.
Parameters โ
| Parameter | Type |
|---|---|
extra | ErrorContext |
Returns โ
this