Contact usRequest a demo

Logging and error handling

The Unblu SDK uses an internal Logger that you can configure to meet your needs.

By default, the logger doesn’t print any potentially security related information. To change this behavior for debugging purposes, set the flag UnbluClient.enableDebugOutput to true. You can change the log level using the field UnbluClient.logLevel.

For mobile co-browsing, you can also enable performance logging. This is done via the UnbluMobileCoBrowsingModuleConfiguration object used to configure the UnbluMobileCoBrowsingModuleApi. For performance logging, set UnbluClient.logLevel to .debug or lower and ensure the UnbluClient.enableDebugOutput flag is enabled.

Error handling

You can get an UnbluClientErrorType error while initializing the SDK in the start(_:) function’s completion handler or after a successful initialization in the UnbluClientDelegate delegation protocol.

Most types of error are fatal and the main SDK functions no longer work properly. When such an error occurs, you should prevent users from accessing the Unblu UI and inform them that the Unblu functionality is momentarily unavailable.

There are two non-fatal errors:

If one of the above errors occurs, you can pass a valid token, for example by verifying that the user is logged in. Later, you can try to restart the API if the error occurred on startup. If it’s a runtime error received in UnbluClientDelegate, continue as usual.