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
apiand correspond to API error types. For exampleapiBadRequestcorresponds to API error typeBadRequestError. - Errors thrown by SDK are prefixed with
sdk. - Errors prefixed with
fdnoriginate 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,
0is 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_logondefaultlevel. - Errors received from API are prefixed with
-
Declaration
Objective-C
extern double SensibillVersionNumberSwift
var SensibillVersionNumber: Double -
Declaration
Objective-C
extern const unsigned char SensibillVersionString[]
Troubleshooting Reference