Skip to content

@lelantos-org/sdk / services / isShieldedFeeRejection

Function: isShieldedFeeRejection() ​

ts
function isShieldedFeeRejection(err): err is NetworkError<NetworkErrorCode>;

Defined in: @lelantos-org/sdk/dist/services/relayer/client.d.ts:63

Whether a thrown error is a relayer refusing a submission over its shielded fee.

The relayer answers 402 for this and nothing else, so the status alone is decisive, but only for errors from this client: 402 is also the x402 payment-challenge status, which services/http/client.ts handles via onPaymentRequired.

The reason is in err.body, verbatim from the relayer: the asset, the amount paid, the amount required, and the grace band. It is prose for display or logging, not for parsing.

The usual remedy is to re-estimate and rebuild: the quote the fee was sized against is stale, and the same payload is refused again.

Parameters ​

ParameterType
errunknown

Returns ​

err is NetworkError<NetworkErrorCode>