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:78class SerializationError extends DiscordPlayerErrorError 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
| Name | Type | Description |
|---|---|---|
| message | stringDefault: '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: DiscordPlayerErrorCodeStable machine-readable error code.