Troubleshooting
-
Summary
This class provides error codes for consistent error handling across SDK. Error codes are available in swift in format
SensibillError.errorCode
, and in Objective C in formatSensibillErrorErrorCode
. Additionally, errors can be constructed fromError
,NSError
, and/or HTTP status code. Error names and values are selected to provide a clue to error origin, severity, and cause:Details
Error Origin
Error prefix identifies origin of the errors:
- Errors received from API are prefixed with
api
and correspond to API error types. For exampleapiBadRequest
corresponds to API error typeBadRequestError
. - Errors thrown by SDK are prefixed with
sdk
. - Errors prefixed with
fdn
originate from Foundation and other native libraries used by an application.
Error Severity
Error code provides a way to identify errors that cannot be resolved by SDK integrator, and require assistance from Sensibill team.
- When there’s no error,
0
is returned (corresponds toSensibillError.none
) - Errors below 0 indicate high severity server-side issues that require assistance from Sensibill team
- Errors above 0 indicate normal severity issues, which can be handled by integrating app.
Error Cause
The name of the error (kincluding origin prefix) provide a clue to error reason.
Error Logging
To further improve troubleshooting, error is logged in detail using
See moreos_log
ondefault
level. - Errors received from API are prefixed with
-
Declaration
Objective-C
extern double SensibillVersionNumber
Swift
var SensibillVersionNumber: Double
-
Declaration
Objective-C
extern const unsigned char SensibillVersionString[]