Discord Player

SerializationError

Error thrown when a serialization input cannot be encoded or decoded.

You are reading the v8 docsDev
ClassTypeScript@discord-player/plugin-host
View sourcepackages/plugin-host/src/errors.ts:78
class SerializationError extends DiscordPlayerError

Error thrown when a serialization input cannot be encoded or decoded.

Constructors

constructoroverride

constructor(
  message: string = 'Could not serialize or deserialize the provided data.',
  options?: ErrorOptions,
)

Create a serialization error with an optional original cause.

Parameters

NameTypeDescription
messagestringDefault: 'Could not serialize or deserialize the provided data.'

Human-readable serialization failure.

options?ErrorOptions

Original error or failure value.

Properties

codereadonly

Inherited from DiscordPlayerError.code

readonly code: DiscordPlayerErrorCode

Stable machine-readable error code.

On this page