Extra: Known exceptions
rook-sdk returns custom exceptions wrapped in a Result
object in each function when an issue is encountered. Below
there is a list of all ROOK exceptions, their description/cause 📜 and how to handle them if encountered 🔧.
missingConfiguration​
📜 The SDK configuration was not initialized.
🔧 Call RookConnectConfigurationManager.shared.setConfiguration(clientUUID: String secretKey: String, enableBackgroundSync: Bool, enableEventsBackgroundSync: Bool)
and add your configuration.
invalidCredentialsOrMissingConfiguration​
📜 The SDK configuration was not initialized or the credential or environment are not correct.
🔧 Call RookConnectConfigurationManager.shared.setConfiguration(clientUUID: String secretKey: String, enableBackgroundSync: Bool, enableEventsBackgroundSync: Bool)
and add your configuration.
Check your client uuid and secrete key are correct and check your are using the correct environment.
emptyUserId​
📜 The User was not initialized or failed to initialize.
🔧 Call RookConnectConfigurationManager.shared.updateUserId(_ id_: String, completion: @escaping (Result<Bool, Error>) -> Void)
and wait for a successful result.
SDKUnavailable​
📜 The SDK was not initialized or failed to initialize.
🔧 Call RookConnectConfigurationManager.shared.init()
and wait for a successful result.
emptySamples​
📜 The SDK could not find any health data related with summary or event requested.
🔧 Check in Health app if you have data for the specific data type and the permission are granted.
featureUnavailable​
📜 The SDK was not initialized or failed to initialize.
🔧 Call RookConnectConfigurationManager.shared.init()
and wait for a successful result.
missingPermissions​
📜 The SDK could not requested health data.
🔧 Before upload any kind of health information call requestAllPermissions(completion: @escaping (Result<Bool, Error>) -> Void)
with RookConnectPermissionsManager
class
rookTransmissionIsNotAvailable​
📜 The SDK was not initialized or failed to initialize.
🔧 Call RookConnectConfigurationManager.shared.init()
and wait for a successful result.
clientUUIDEmpty​
📜 The SDK configuration was not initialized or the credential or environment are not correct.
🔧 Call RookConnectConfigurationManager.shared.setConfiguration(clientUUID: String secretKey: String, enableBackgroundSync: Bool, enableEventsBackgroundSync: Bool)
and add your configuration.
Check your client uuid and secrete key are correct and check your are using the correct environment.
emptyData​
📜 The SDK could not find any health data related with summary or event requested.
🔧 Check in Health app if you have data for the specific data type and the permission are granted.
healthKitNotAvailable​
📜 Health kit is not available on your device.
🔧 Check if your device is able to use health kit.