All methods on
NablaMessagingClient can return an error in their
Result. This error will always be of type
There are 3 types of exceptions you might want to handle specifically:
NablaException.Network: for a network related error. You probably want to provide the user with a retry mechanism when this error happens
NablaException.Configuration: for a misconfiguration of the SDK
NablaException.Authentication: when a call to
NablaClient.authenticateis missing before calling an authenticated API or when the
SessionTokenProviderfailed to get fresh tokens
See all cases in the NablaException class
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 a Toast explaining what failed.
In all cases, the error will also be logged if logging was enabled during SDK initialization:
NablaClient.initialize( configuration = Configuration( isLoggingEnabled = true, // Enable logging ) )
Updated about 1 month ago