Skip to content

BadMagicError

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

Thrown when a frame does not start with the four-byte AMQF magic, so it was never produced by toBytes. Check that the bytes really are a distillate frame and not another payload, a text encoding of one, or a slice taken at the wrong offset.

new BadMagicError(message?): BadMagicError

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

string

BadMagicError

SerializationError.constructor

new BadMagicError(message?, options?): BadMagicError

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

string

ErrorOptions

BadMagicError

SerializationError.constructor

optional cause?: unknown

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

SerializationError.cause


message: string

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

SerializationError.message


readonly name: "BadMagicError" = "BadMagicError"

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

Discriminates this error from other Errors.

SerializationError.name


optional stack?: string

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

SerializationError.stack