Error Handling

The SDK is structured into multiple modules and each module will raise its own high level exception type which only has one variant ExceptionDetails(source:SdkException).

This is required due to the way how the language bindings of Rust are being generated and how exceptions are being handled differently across multiple platforms.

Exception Categories

Exception Type

Description

SdkManagerException

SdkManager related exception

SdkConfigurationException

SDK Configuration related exception

DipException

There was a DIP related exception

IdentityException

Identity related exception

IdpException

Identity Protection related exception

InstanceDiscoveryException

Instance Discovery related exception

SubscriptionsException

Subscriptions related exceptions

TokenException

Token Management related exceptions

CallbackException

Exception thrown by the client’s callback implementation for HTTPCallbackProtocol and StorageCallbackProtocol

InAppPaymentException

InApp Payments related exception

LicenseException

Exceptions related to license validity

The SdkException type contains details about the concrete source of the exception,

Handling Exceptions properly

In the first step, you catch the top-level type, then you evaluate the source field of that top-level type further.

Last updated