Skip to content

Graphorin API reference v0.7.0


Graphorin API reference / @graphorin/client / errors

errors

Typed error hierarchy surfaced by @graphorin/client. Every error class extends the JavaScript built-in Error and exposes a stable kind discriminator so consumers can pattern-match without relying on instanceof (which behaves badly across module-system boundaries when the package is dual-loaded).

Classes

ClassDescription
AuthFailedError-
ClientAbortedError-
ClientNotConnectedError-
GraphorinClientErrorBase class for every error raised by @graphorin/client. Carries a stable GraphorinClientErrorKind discriminator and an optional cause chain.
InvalidServerFrameError-
ProtocolViolationError-
SubprotocolMismatchError-
SubscriptionNotFoundError-
TransportFailedError-

Type Aliases

Type AliasDescription
GraphorinClientErrorKindDiscriminator union of every error kind raised by the client.

Functions

FunctionDescription
kindForRpcCodeIP-19: map a JSON-RPC error code from a server RpcFailure frame to the client's discriminated GraphorinClientErrorKind, so a rate-limited or scope-denied RPC is distinguishable from a genuine protocol violation.