Class: CCIPTokenTransferPausedError
Defined in: errors/specialized.ts:2764
Thrown when a pause stops a token transfer: a multi-token pool's global pause, or a pause of the
token or of the remote chain in the transfer's direction. context.scope gives the pause
('global', 'token' or 'chain') and context.direction the direction ('outbound' on the
source, 'inbound' on the destination). Not transient: only the pool's pause admins can lift it.
Example
try {
await chain.getFee({ router, destChainSelector, message })
} catch (error) {
if (error instanceof CCIPTokenTransferPausedError) {
console.log(`${error.context.token} is paused (${error.context.scope})`)
}
}
Extends
Constructors
Constructor
new CCIPTokenTransferPausedError(
status: {direction:"outbound"|"inbound";scope:"token"|"chain"|"global";status:"paused"; },lane:TokenTransferLane,options?:CCIPErrorOptions):CCIPTokenTransferPausedError
Defined in: errors/specialized.ts:2767
Creates a token transfer paused error.
Parameters
| Parameter | Type |
|---|---|
status | { direction: "outbound" | "inbound"; scope: "token" | "chain" | "global"; status: "paused"; } |
status.direction | "outbound" | "inbound" |
status.scope | "token" | "chain" | "global" |
status.status | "paused" |
lane | TokenTransferLane |
options? | CCIPErrorOptions |
Returns
CCIPTokenTransferPausedError
Overrides
Properties
_isCCIPError
readonly_isCCIPError:true
Defined in: errors/CCIPError.ts:30
Brand for cross-module identification (dual package hazard).
Inherited from
code
readonlycode:CCIPErrorCode
Defined in: errors/CCIPError.ts:32
Machine-readable error code.
Inherited from
context
readonlycontext:Record<string,unknown>
Defined in: errors/CCIPError.ts:34
Structured context (IDs, addresses).
Inherited from
isTransient
readonlyisTransient:boolean
Defined in: errors/CCIPError.ts:36
True if retry may succeed.
Inherited from
name
readonlyname:"CCIPTokenTransferPausedError"='CCIPTokenTransferPausedError'
Defined in: errors/specialized.ts:2765
Overrides
recovery?
readonlyoptionalrecovery?:string
Defined in: errors/CCIPError.ts:40
Recovery suggestion.
Inherited from
retryAfterMs?
readonlyoptionalretryAfterMs?:number
Defined in: errors/CCIPError.ts:38
Retry delay in ms.
Inherited from
Methods
toJSON()
toJSON():
Record<string,unknown>
Defined in: errors/CCIPError.ts:105
Serializes the error for logging.
Use this instead of JSON.stringify(error) directly, as Error properties
are non-enumerable and would be lost.
Returns
Record<string, unknown>
An object containing all error properties
Inherited from
from()
staticfrom(error:unknown,code?:CCIPErrorCode):CCIPError
Defined in: errors/CCIPError.ts:89
Wraps an unknown caught value in a CCIPError.
Useful for normalizing errors in catch blocks.
Parameters
| Parameter | Type | Description |
|---|---|---|
error | unknown | The error to wrap |
code? | CCIPErrorCode | Optional error code (defaults to 'UNKNOWN') |
Returns
A CCIPError wrapping the original error
Inherited from
isCCIPError()
staticisCCIPError(error:unknown):error is CCIPError
Defined in: errors/CCIPError.ts:73
Type guard for CCIPError.
Prefer this over instanceof to handle the dual package hazard
when multiple versions of the SDK may be present.
Parameters
| Parameter | Type | Description |
|---|---|---|
error | unknown | The error to check |
Returns
error is CCIPError
True if the error is a CCIPError instance