@somnia-chain/markets-sdk


@somnia-chain/markets-sdk / index / NotConfiguredError

Class: NotConfiguredError

Defined in: packages/sdk/src/errors.ts:104

The feature needs a contract address (or URL) that this client wasn't given.

Details

The SDK degrades by feature rather than refusing to construct: most SomniaMarketsAddresses entries are optional, and the methods that need one throw this when it's absent.

Gotchas

Because construction succeeds, a missing address surfaces at the first call that needs it rather than at new SomniaMarkets(…) — so a feature can look wired up until it's exercised. The fix is always config-side (pass the address, or the method's own override param), never a retry.

Extends

Constructors

Constructor

new NotConfiguredError(what, detail): NotConfiguredError

Defined in: packages/sdk/src/errors.ts:109

Parameters

what

string

The config key or contract the operation needs (e.g. "addresses.oracleHub").

detail

string

What was being attempted, and how to supply it.

Returns

NotConfiguredError

Overrides

SomniaMarketsError.constructor

Properties

what

readonly what: string

Defined in: packages/sdk/src/errors.ts:110

The config key or contract the operation needs (e.g. "addresses.oracleHub").