Error Types
Reference for ConvexCallError, normalization, and serialized errors.
import {
ConvexCallError,
isSerializedConvexCallError,
normalizeConvexError,
type ConvexCallErrorKind,
type SerializedConvexCallError,
} from '@lupinum/better-convex-nuxt/errors'ConvexCallErrorKind
type ConvexCallErrorKind = 'authentication' | 'transport' | 'server' | 'unknown'ConvexCallError
| Field | Type |
|---|---|
name | 'ConvexCallError' |
kind | ConvexCallErrorKind |
message | string |
code | string | undefined |
status | number | undefined |
data | unknown |
ConvexCallError deliberately has no cause; raw upstream values cannot be
recovered from direct access, inspection, cloning, JSON, or SSR serialization.
normalizeConvexError
normalizeConvexError(error: unknown): ConvexCallErrorIt passes an existing ConvexCallError through, recognizes structured Convex application errors as server, and returns unknown when no stable classification exists. It does not classify from message substrings.
Serialized guard
isSerializedConvexCallError(value): value is SerializedConvexCallErrorUse the guard at custom serialization boundaries. Nuxt payload revival is installed by the module automatically.