Members
# static getErrors
returns an object ({ errors: Array<Monitor.FlexErrorJSON> }) with errors occoured.
Example
import { Monitor } from "@twilio/flex-ui";
Monitor.getErrors(); // returns { errors: Array<Monitor.FlexErrorJSON> }
# static getLogs
returns an object with logs recorded.
Example
import { Monitor } from "@twilio/flex-ui";
Monitor.getLogs(); // returns { logs: string }
# static sendDebuggerEvent
creates and sends a Custom Error Event to Twilio Debugger
Example
Monitor.sendDebuggerEvent("Connection failed"); // creates and sends error event to Twilio Debugger
Type Definitions
# ErrorDetails
FlexError.FlexErrorContents
Information about the session where the error occured
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
message |
string | Error message. | |
wrappedError |
string |
<optional> |
The original error message. |
# FlexErrorJSON
Information about the session where the error occured
Properties:
Name | Type | Description |
---|---|---|
title |
string | Normalized title of an error. |
name |
string | Raw name of an error. |
message |
string | Error message. |
logLine |
string | Normalized log line of an error. |
stack |
string | Represents stack trace of an error |
details |
Monitor.ErrorDetails | Contents more details of an error. |
wrappedError |
string | Monitor.FlexErrorJSON | The original error. |
logs |
string | Logs around the error. |
sessionData |
FlexError.SessionData | Information about the session where the error occured. |