Monitor
Monitor API’s are designed to retrieve Error reports and logs programmatically. Flex.Monitor.getLogs returns the current logs and Flex.Monitor.getError returns all recorded errors in an array. You can use these methods to implement special reporting or report handling. You can learn more about troubleshooting Flex UI here
getErrors#
Creates and returns a JSON representation of the error array
Example:
import { Monitor } from "@twilio/flex-ui";Monitor.getErrors(); // returns { errors: {@link Monitor.FlexErrorJSON}[] }
getLogs#
Creates a dump from the log manager content and returns the formatted data
Example:
import { Monitor } from "@twilio/flex-ui";Monitor.getLogs(); // returns { logs: string }
sendDebuggerEvent#
Creates and sends a Custom Error Event to Twilio Debugger
Example:
Monitor.sendDebuggerEvent("Connection failed"); // creates and sends error event to Twilio Debugger
Rate this page