Skip to content

SerializationError

Defined in: packages/distillate/src/core/serialize.ts:70

Base class for every defect fromBytes and fromJSON reject. Thrown directly when a JSON envelope is malformed: not an object, missing the "distillate" tag, missing data, or data that is not valid base64. Catch this to handle any decode failure at once, or a subclass to tell the causes apart. The input is corrupt or foreign, so discard it; retrying the same bytes cannot succeed.

  • Error

new SerializationError(message?): SerializationError

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1082

string

SerializationError

Error.constructor

new SerializationError(message?, options?): SerializationError

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1082

string

ErrorOptions

SerializationError

Error.constructor

optional cause?: unknown

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26

Error.cause


message: string

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077

Error.message


readonly name: string = "SerializationError"

Defined in: packages/distillate/src/core/serialize.ts:72

Discriminates this error from other Errors.

Error.name


optional stack?: string

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078

Error.stack