Skip to content

API reference / Common / Engine types / ErrorKind

Type Alias: ErrorKind ​

ts
type ErrorKind = 
  | "invalidRequest"
  | "notFound"
  | "unsupported"
  | "malformed"
  | "passwordRequired"
  | "io"
  | "internal";

What a caller can do about a failure: one kind per thing it does differently. Every finer distinction — which part, which offset, which id — is the message.

A kind names the failure, not the subsystem it happened in: a peer's patch the CRDT rejects is Malformed, a container the codec wrote itself and can't read back is Internal.