Skip to main content
Version: 1.17.0

Class: CCIPSolanaV2LaneUnavailableError

Defined in: errors/specialized.ts:3754

Thrown when a Solana message requires a CCIP 2.0 lane (its extraArgs are GenericExtraArgsV3), but the router can't send it over one: the lane isn't configured for 2.0, the router doesn't have 2.0 support yet, or the lane has its sender allowlist enabled, which the SDK doesn't send 2.0 messages over while the router has a 1.6 lane to fall back to.

Example​

TypeScript
try {
await solanaChain.sendMessage({ router, destChainSelector, message, wallet })
} catch (error) {
if (error instanceof CCIPSolanaV2LaneUnavailableError) {
console.log(`No 2.0 lane (${error.context.reason}); retry with legacy extraArgs`)
}
}

Extends​

Constructors​

Constructor​

new CCIPSolanaV2LaneUnavailableError(reason: SolanaV2LaneUnavailableReason, context: { destChainSelector: bigint; router: string; }, options?: CCIPErrorOptions): CCIPSolanaV2LaneUnavailableError

Defined in: errors/specialized.ts:3757

Creates a Solana CCIP 2.0 lane unavailable error.

Parameters​

ParameterType
reasonSolanaV2LaneUnavailableReason
context{ destChainSelector: bigint; router: string; }
context.destChainSelectorbigint
context.routerstring
options?CCIPErrorOptions

Returns​

CCIPSolanaV2LaneUnavailableError

Overrides​

CCIPError.constructor

Properties​

_isCCIPError​

readonly _isCCIPError: true

Defined in: errors/CCIPError.ts:30

Brand for cross-module identification (dual package hazard).

Inherited from​

CCIPError._isCCIPError


code​

readonly code: CCIPErrorCode

Defined in: errors/CCIPError.ts:32

Machine-readable error code.

Inherited from​

CCIPError.code


context​

readonly context: Record<string, unknown>

Defined in: errors/CCIPError.ts:34

Structured context (IDs, addresses).

Inherited from​

CCIPError.context


isTransient​

readonly isTransient: boolean

Defined in: errors/CCIPError.ts:36

True if retry may succeed.

Inherited from​

CCIPError.isTransient


name​

readonly name: "CCIPSolanaV2LaneUnavailableError" = 'CCIPSolanaV2LaneUnavailableError'

Defined in: errors/specialized.ts:3755

Overrides​

CCIPError.name


recovery?​

readonly optional recovery?: string

Defined in: errors/CCIPError.ts:40

Recovery suggestion.

Inherited from​

CCIPError.recovery


retryAfterMs?​

readonly optional retryAfterMs?: number

Defined in: errors/CCIPError.ts:38

Retry delay in ms.

Inherited from​

CCIPError.retryAfterMs

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​

CCIPError.toJSON


from()​

static from(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​

ParameterTypeDescription
errorunknownThe error to wrap
code?CCIPErrorCodeOptional error code (defaults to 'UNKNOWN')

Returns​

CCIPError

A CCIPError wrapping the original error

Inherited from​

CCIPError.from


isCCIPError()​

static isCCIPError(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​

ParameterTypeDescription
errorunknownThe error to check

Returns​

error is CCIPError

True if the error is a CCIPError instance

Inherited from​

CCIPError.isCCIPError