Documentation / @etherfold/core / UnexpectedProviderMethodError
Class: UnexpectedProviderMethodError ​
Defined in: packages/core/src/providerSurface.ts:107
A provider asked for something outside the engine's declared surface.
This is an INTERNAL invariant rather than an operator error: no configuration and no node can provoke it, because the only code that reaches a guarded provider is this engine. It is thrown rather than logged so that a reintroduced call fails WHEREVER it is added, in the whole test suite, rather than only where somebody thought to look -- a permissive test double would otherwise answer it and the cost would ship.
If a method genuinely belongs in the engine, the fix is to DECLARE it in ENGINE_PROVIDER_METHODS (and say so in the README claim the tests hold to it), never to route around the wrapper.
Extends ​
Error
Constructors ​
Constructor ​
new UnexpectedProviderMethodError(
method,reason):UnexpectedProviderMethodError
Defined in: packages/core/src/providerSurface.ts:112
Parameters ​
method ​
string
reason ​
"undeclared" | "not-the-genesis-probe"
Returns ​
UnexpectedProviderMethodError
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
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
method ​
readonlymethod:string
Defined in: packages/core/src/providerSurface.ts:113
name ​
readonlyname:"UnexpectedProviderMethodError"='UnexpectedProviderMethodError'
Defined in: packages/core/src/providerSurface.ts:108
Overrides ​
Error.name
retryable ​
readonlyretryable:false=false
Defined in: packages/core/src/providerSurface.ts:110
A provider does not stop being asked the wrong question while a caller waits.
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