Called when an error occurs while a user is connecting to your Okra Widget

The onExit callback is called when an error occurs during the Okra Widget initialization. It takes two arguments, a nullable error object and a metadata JSON object. The metadata parameter is always present, though some values may be null.

import Okra from 'npm-okrajs';

const OkraHandler = Okra.buildWithOptions({
  onError: (json, error) => {
        console.log('You have connected!', json)

What's Next

View the possible widget errors or what happens every time the widget registers an event.

Did this page help you?