@somnia-chain/markets-sdk


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

Class: NotConfiguredError

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

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:124

Creates a missing-configuration error for one operation.

Details

  • what: The config key or contract the operation needs (e.g. "addresses.oracleHub").
  • detail: What was being attempted, and how to supply it.

Parameters

what

string

detail

string

Returns

NotConfiguredError

Overrides

SomniaMarketsError.constructor

Properties

what

readonly what: string

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