Skip to main content

Class: VindralError

Represents a vindral error - all errors emitted from the Vindral instance inherit from this class.

Extends​

  • Error

Methods​

code()​

code(): string

The error code is a stable string that represents the error type - this should be treated as an opaque string that can be used as a key for looking up localized strings for displaying error messages.

Returns​

string

the error code


isFatal()​

isFatal(): boolean

Indicates whether the error is fatal - if it is that means the Vindral instance will be unloaded because of this error.

Returns​

boolean


source()​

source(): Error | MediaError | undefined

The underlying error that caused the Vindral error

Returns​

Error | MediaError | undefined

the underlying error


toStringifiable()​

toStringifiable(): Record<string, unknown>

Returns​

Record<string, unknown>

a stringifiable represenation of the error