Error Handling

The UI Apps SDK enables you to execute an action when a certain error occurs.

NOTE: Before you start using the SDK methods, ensure you have imported and configured the SDK first.

onEventTypeNotSupported

Allows you to pass a callback that will be executed each time an event is not supported by the current SDK version. The message type and the current SDK version will be passed as arguments. For example:

sdk.onEventTypeNotSupported((params) => {
  console.log(params);
});

onEventTypeNotExpected

Allows you to pass a callback that will be executed each time an event is not expected. The message type will be passed as an argument. For example:

sdk.onEventTypeNotExpected((params) => {
  console.log(params);
});