If the default information tracked by our tracker when a JS error occurs is not enough, you can use this method. The
handleError method manually reports caught exceptions, rejected promises or error events. See error reporting for more details.
SignatureSection titled Signature
handleError: (e: Error | ErrorEvent | PromiseRejectionEvent, metadata?: Record<string, any>) => void
ParametersSection titled Parameters
e: Error | ErrorEvent | PromiseRejectionEvent: The actual error object being caught.
metadata: Record<string, any>: [Optional] A dictionary-like structure with all the extra information you want to save associated to this error.
Return valueSection titled Return value
This method doesn’t return any values, the saved information can be seen inside the OpenReplay platform.