Skip to content

Documentation / @etherfold/core / UnexpectedChainError

Class: UnexpectedChainError ​

Defined in: packages/core/src/errors.ts:622

A provider that is not serving the chain the source names.

The ONE refusal for that condition, in both deployment shapes (ADR-0081), so that an operator reads one refusal rather than a spelling per call site. The log-fetcher asks once a cycle, after the fetch and before the push, because it is the one corruption the receiving half cannot possibly catch: the receiver makes no chain calls at all (ADR-0003), so logs from the wrong chain arrive carrying a perfectly valid {source, config} and are indexed as if they were ours. The in-process engine asks at its own three points (see ChainIdentityCheckPoint), where there is no receiver and nothing is pushed -- which is why the consequence is per-point and the two ids are not. An endpoint behind a load balancer, or a wallet provider the user switched networks on, is enough to produce any of them.

Extends ​

  • Error

Constructors ​

Constructor ​

new UnexpectedChainError(expectedChainId, actualChainId, when): UnexpectedChainError

Defined in: packages/core/src/errors.ts:627

Parameters ​

expectedChainId ​

string

actualChainId ​

string

when ​

ChainIdentityCheckPoint

Where it was caught, which also decides the consequence the message states.

Returns ​

UnexpectedChainError

Overrides ​

Error.constructor

Properties ​

actualChainId ​

readonly actualChainId: string

Defined in: packages/core/src/errors.ts:629


cause? ​

optional cause?: unknown

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts:24

Inherited from ​

Error.cause


expectedChainId ​

readonly expectedChainId: string

Defined in: packages/core/src/errors.ts:628


message ​

message: string

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075

Inherited from ​

Error.message


name ​

readonly name: "UnexpectedChainError" = 'UnexpectedChainError'

Defined in: packages/core/src/errors.ts:623

Overrides ​

Error.name


retryable ​

readonly retryable: false = false

Defined in: packages/core/src/errors.ts:625

A provider does not wander back onto the right chain while a sender waits.


stack? ​

optional stack?: string

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from ​

Error.stack

Methods ​

isError() ​

static isError(error): error is Error

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.esnext.error.d.ts:21

Indicates whether the argument provided is a built-in Error instance or not.

Parameters ​

error ​

unknown

Returns ​

error is Error

Inherited from ​

Error.isError