@twilio/voice-sdk
Version:
Twilio's JavaScript Voice SDK
43 lines (42 loc) • 1.02 kB
TypeScript
/**
* Base class for all possible errors that the library can receive from the
* Twilio backend.
*/
export default class TwilioError extends Error {
/**
* A list of possible causes for the Error.
*/
causes: string[];
/**
* The numerical code associated with this Error.
*/
code: number;
/**
* A description of what the Error means.
*/
description: string;
/**
* An explanation of when the Error may be observed.
*/
explanation: string;
/**
* Any further information discovered and passed along at run-time.
*/
message: string;
/**
* The name of this Error.
*/
name: string;
/**
* The original error object received from the external system, if any.
*/
originalError?: object;
/**
* A list of potential solutions for the Error.
*/
solutions: string[];
/**
* @internal
*/
constructor(messageOrError?: string | Error | object, error?: Error | object);
}