Documentation / @etherfold/core / ArchiveRefusedError
Class: ArchiveRefusedError ​
Defined in: packages/core/src/errors.ts:393
An endpoint that will not serve the HISTORY being asked for, whatever range it is asked for it in.
Serving logs for old blocks needs an archive node, and public endpoints commonly token-gate it: ethereum-rpc.publicnode.com answers a backfill with -32602 "Archive requests require a personal token. Get one at: ...", captured 2026-06-30 and again, byte-identical, on 2026-09-08 (docs/spikes/a-provider-refusal-is-read-from-its-data-before-its-prose/).
Every other refusal the fetcher meets is a RANGE complaint, answered by asking for less. This one is not: no range size satisfies it, so halving spends the whole retry budget shrinking a window the endpoint was never going to serve, and then fails with whatever the last error happened to be -- which is a range error, about the wrong thing entirely. The operator reads "the range was too big" and tunes maxBlocksPerFetch, when what they have is an endpoint that does not serve history.
So the class is recognised where the range hints are read and reported HERE, naming the cause. retryable is false for the literal reason the flag exists: waiting changes nothing, because nothing about this endpoint changes until an operator points somewhere else or pays for a token.
Why this is deliberately narrow ​
The classifier matches only a refusal that IDENTIFIES itself as an archive or history ACCESS problem (see archiveRefusalFromError), and everything else keeps halving. A false terminal is worse than the grinding it replaces: grinding is slow and visible, while a transient outage mistaken for a terminal refusal stops an indexer fast, wrongly, and for good.
Extends ​
Error
Constructors ​
Constructor ​
new ArchiveRefusedError(
fromBlock,toBlock,providerMessage):ArchiveRefusedError
Defined in: packages/core/src/errors.ts:398
Parameters ​
fromBlock ​
number
The block the refused fetch started at.
toBlock ​
number
The block it asked to reach.
providerMessage ​
string
What the provider said, verbatim, so the claim is checkable against the node.
Returns ​
ArchiveRefusedError
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
fromBlock ​
readonlyfromBlock:number
Defined in: packages/core/src/errors.ts:400
The block the refused fetch started at.
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:"ArchiveRefusedError"='ArchiveRefusedError'
Defined in: packages/core/src/errors.ts:394
Overrides ​
Error.name
providerMessage ​
readonlyproviderMessage:string
Defined in: packages/core/src/errors.ts:404
What the provider said, verbatim, so the claim is checkable against the node.
retryable ​
readonlyretryable:false=false
Defined in: packages/core/src/errors.ts:396
The endpoint does not grow an archive while a scheduler waits. The fix is an operator's.
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
toBlock ​
readonlytoBlock:number
Defined in: packages/core/src/errors.ts:402
The block it asked to reach.
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