Exceptions
Exceptions are unexpected faulty behaviors that occur during the app execution. All errors and exceptions in Android or iOS apps built on Flutter SDK are handled by enumerations called ZCatalystException, defined in the Android SDK package.
If an exception occurs in your mobile app, the following Dart properties of the exception are returned:
- code: Unique identifier of the error
- errorMsg: General description about the error
- errorDetails: Additional information about the error
- originalException: The actual exception that was thrown
A list of common error codes thrown by the Catalyst Flutter SDK and their descriptions are given below:
Error Codes | Descriptions |
---|---|
INITIALIZATION_ERROR | The SDK initialization failed |
LOGIN_ERROR | The login process failed for the user |
LOGOUT_FAILED | The logout process failed for the user |
TOKEN_FETCH_ERROR | Failed to fetch the access token |
RESPONSE_PARSE_ERROR | The received response is non-parseable |
NO_NETWORK_AVAILABLE | Network connectivity is not available to make the API call |
API_FAILED | The API invocation failed |
INVALID_DATA | The data submitted is not of a valid type for the specific format |
FILE_SIZE_EXCEEDED | The file size of an uploaded file exceeded the 100 MB file size limit |
FUNCTION_EXECUTION_ERROR | Failed to execute the function |
JSON_EXCEPTION | The body included in the request is not a valid JSON |
INVALID_REQUEST | The request created is not valid |
INVALID_FILE_INPUT | File submitted in the upload operation is not valid |
INTERNAL_ERROR | An internal error occurred in the SDK |
INVALID_CONFIGURATION | The SDK has not been initialized with the configuration required for the login. Reinitialize the SDK with the appropriate configuration for the login. |
CUSTOM_LOGIN_DISABLED | The parameters required for third-party authentication could not be found. Make sure you have enabled third-party authentication for the project or re-download the property file. |
Exceptions in iOS Apps
If an error occurs in your iOS app, the following properties of the error are returned:
- code: Unique identifier of the error
- message: General description about the error
- details: Additional information about the error
A list of common error codes thrown by the Catalyst iOS SDK and their descriptions are given below:
Error Codes | Descriptions |
---|---|
INVALID_DATA | Data is in an invalid format |
INTERNAL_ERROR | Error occurred due to internal problems, servers, or something else |
RESPONSE_NIL | No response was returned from the server |
TOKEN_FETCH_ERROR | Failed to fetch the access token |
OAUTH_FETCH_ERROR | Error occurred while fetching the OAUTH token |
UNABLE_TO_CONSTRUCT_URL | Error occurred while constructing the URL |
PROCESSING_ERROR | Error occurred while processing the data |
TYPECAST_ERROR | Error occurred while type-casting the data |
NO_INTERNET_CONNECTION | Device is not connected to the internet |
REQUEST_TIMEOUT | Response from the server did not arrive on time |
NETWORK_CONNECTION_LOST | Device has lost its connection with the Internet |
INITIALIZATION_ERROR | Error occurred while initializing the SDK |
FUNCTION_EXECUTION_ERROR | Error occurred while executing a function |
JSON_EXCEPTION | Error occurred while parsing the JSON |
Last Updated 2024-09-13 11:10:11 +0530 +0530
Yes
No
Send your feedback to us
Skip
Submit