All methods on
NablaMessagingClient that can fail will have an
errorCallback: (error: NablaError) => void. This error will always be of type
There are 2 types of errors you might want to handle specifically:
NetworkError: for a network related error. You probably want to provide the patient with a retry mechanism when this error happens.
AuthenticationError: when a call to
NablaClient.setCurrentUserOrThrowis missing before calling an authenticated API or when the
provideAuthTokensfailed to get fresh tokens.
If any error occurs, the Nabla UI component will handle it in one of the following ways.
- If error is global, e.g. we failed to fetch the list of conversation. Component will then show a text message with a retry button.
- If error is not global, e.g. we failed to load a second page of messages. Component will then show an alert explaining what failed.
By default, the SDK will communicate anonymized events with Nabla servers to help us improve features like video calls.
If you want to disable this reporting, you can do so during the SDK initialization:
await NablaClient.getInstance().initialize( new Configuration(apiKey, false) /* provideAuthTokens */ );
Updated 6 months ago