@somnia-chain/markets-sdk / index / InvariantError
Class: InvariantError
Defined in: packages/sdk/src/raise.ts:29
Thrown when an invariant the code had already established turns out false.
Details
Seeing this in a log means the SDK's own reasoning was wrong — not that a caller did anything invalid. That distinction is why it is its own class.
Gotchas
It should never be caught to control flow, only reported as a bug.
Extends
Constructors
Constructor
new InvariantError(
message):InvariantError
Defined in: packages/sdk/src/raise.ts:30
Parameters
message
string
Returns
InvariantError