client.version; // version of the JavaScript SDK
To see if an error is being raised a callback can be added to the clientSession object. The error object that is returned will contain information on the details, type and severity of the error being raised.
The callback can be added as such:
clientSession.addOnErrorCallback(function (error) {
console.log(error);
});
The easiest way to log SDK events is to use the browser's native console API by implementing the following in your code
client.registerLogger(console);
Logger will then be executed internally in the SDK. The Customer Interaction Services Client SDK package for JavaScript uses 5 different logging levels.
Type | Name | Description |
---|---|---|
badRequest | 400000 | Validation failed |
unauthorized | 401000 | No Authorization header |
unauthorized | 401001 | Invalid authorization schema |
unauthorized | 401002 | Invalid token |
unauthorized | 401003 | Invalid username or password from authentication provider |
unauthorized | 401004 | Could not get authentication enabled property from properties |
unauthorized | 401005 | Invalid claims in token |
unauthorized | 401006 | Authentication provider not found |
unauthorized | 401007 | An internal error occurred for the authentication provider |
unauthorized | 401008 | Authentication provider is incorrectly configured |
unauthorized | 401009 | Authentication provider could not find Oceana user |
unauthorized | 401010 | Authentication provider returned unexpected status code |
unauthorized | 401011 | Could not communicate with Authentication provider |
forbidden | 403000 | Access denied. Not authorised. |
forbidden | 403001 | HTTPS required |
notFound | 404000 | UserDetails not found |
notFound | 404001 | UserProfile not found |
notFound | 404002 | UserSession not found |
notFound | 404003 | UserState not found |
notFound | 404004 | AuthenticationServerUser not found |
notFound | 404005 | UserProfileAccount not found |
notFound | 404006 | Resource not found |
notFound | 404007 | ClientSession not found |
notFound | 404008 | Account not found |
notFound | 404009 | Interaction not found |
internal | 500000 | Internal Error |