Documentation / @etherfold/core / WireContextMismatchError
Class: WireContextMismatchError ​
Defined in: packages/core/src/errors.ts:136
A batch that belongs to a different indexer.
context.source and context.config are asserted by the SENDER and checked on every batch, because the alternative is silently corrupted state: logs for one source folded into the state of another, discovered later as a wrong answer with nothing pointing at the cause. It is the wire-side half of the hole docs/reviews/todo-triage.md found in every persistence layer.
Deliberately NOT an UnexpectedFromBlockError, and the distinction is operational rather than cosmetic. A cursor refusal is RECOVERABLE by the sender on its own: re-send from the block named. A context mismatch is a misconfiguration, and no block number makes it right; a sender that treated the two alike would retry forever against a server that will never accept it.
context.processor is absent from what is checked here, because the sender cannot assert it: it has no idea which processor version runs on this side. The receiver owns that third identity and checks it against its own persisted cursor instead (see StreamBuilder).
Extends ​
Error
Constructors ​
Constructor ​
new WireContextMismatchError(
expected,received):WireContextMismatchError
Defined in: packages/core/src/errors.ts:140
Parameters ​
expected ​
The {source, config} this receiver indexes.
received ​
The {source, config} the batch claimed.
Returns ​
WireContextMismatchError
Overrides ​
Error.constructor
Properties ​
cause? ​
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts:24
Inherited from ​
Error.cause
expected ​
readonlyexpected:WireContext
Defined in: packages/core/src/errors.ts:142
The {source, config} this receiver indexes.
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 ​
readonlyname:"WireContextMismatchError"='WireContextMismatchError'
Defined in: packages/core/src/errors.ts:137
Overrides ​
Error.name
received ​
readonlyreceived:WireContext
Defined in: packages/core/src/errors.ts:144
The {source, config} the batch claimed.
retryable ​
readonlyretryable:false=false
Defined in: packages/core/src/errors.ts:138
stack? ​
optionalstack?: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() ​
staticisError(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