The Kuzzle instance periodically emits named events that provide useful updates about the state of the Kuzzle client. To subscribe to these events, use the addListener function and specify the event name and the callback function that will be executed when the event is emitted. To unsubscribe to an event, use the removeListener function, specifying the name of the event to remove.
|Event Name||Callback arguments||Description|
| ||(none)||Triggered when the SDK has successfully connected to Kuzzle|
| || ||Triggered when Kuzzle rejects a request (e.g. request can't be parsed, request too large, ...)|
| ||(none)||Triggered when the current session has been unexpectedly disconnected|
| || ||Triggered when a login attempt completes, either with a success or a failure result|
| || ||Triggered when the SDK has failed to connect to Kuzzle. Does not trigger offline mode.|
| || ||Triggered whenever a request is removed from the offline queue.|
| || ||Triggered whenever a request is added to the offline queue|
| || ||Triggered whenever Kuzzle responds with an error|
| ||(none)||Triggered when the current session has reconnected to Kuzzle after a disconnection, and only if |
| ||(none)||Triggered when Kuzzle rejected a request because the authentication token expired|
Note: listeners are called in the order of their insertion.