All client SDK's can emit or throw errors. General errors are emitted by the client instance, specific errors are emitted by the object that encountered them, e.g.
MESSAGE_DENIED by the record that attempted a forbidden operation.
Authentication and Connectivity
Thrown once the connectionState changes to a final
ERROR state. (Learn more about connectivity issues)
The client has attempted to recover the connection too many times and is now giving up. Learn more about configuring
To prevent distributed denial of service (DDOS) attacks, deepstreamHub will cut unauthenticated connections after a certain time, resulting in this error.
To prevent rainbow table / brute force attacks deepstreamHub limits client's to three unsuccessful authentication attempts before the connection is cut. That does NOT mean however that your users need to be limited to three attempts - however you will need to establish a new client connection after the third unsuccessful attempt
The deepstreamHub client SDKs can be used before the connection is authenticated - in which case they'll use the same internal message queue that is used to counteract connection losses. If the connection isn't authenticated in time though this might lead to a NOT_AUTHENTICATED error. Generally, if you're not using an open connection we'd recommend initialising your application only after successful authentication.
This error occurs when an operation is denied by the Valve permission check.
Record & RPC
This will be passed to record snapshot requests if the record doesn't exist. Please note that
getRecord() will create the record if it doesn't exist rather than throw an error. It is possible to check if a record exists using
This error happens when a client attempts to make a remote procedure call for which no provider can be found. This can either mean that no providers are registered for a given RPC or that all registered providers choose to reject the request.
During data-conflicts, e.g. when two clients write to the same record at the same time, deepstream will invoke a merge routine. If this routine however errors or remains inconclusive, the above error is thrown.
Numerous operations (subscribing to events, requesting records etc.) will be acknowledged by deepstreamHub. If this acknowledgement hasn't happened in time, an
ACK_TIMEOUT error will be thrown. **This doesn't mean the operation failed, especially for bulk operations its still possible that the
ACK message arrives a bit later. For these cases we recommend setting a higher timeout in the client options
Occurs when the response for an RPC doesn't arrive within a given time.
Occurs when the confirmation that a record was successfully deleted doesn't arrive within a given time
The client received a message it didn't ask for, e.g. an update for a record it's not subscribed to. This can be the result of a race condition, e.g. when requesting and discarding records in quick succession and can usually be safely ignored.
The client received a syntactically incorrect message