Handling Errors

How to Handle Errors

When a biometric flow fails, it can be due to a number of reasons outside an exit form. Those errors appear for the user in the form of coloured screens. So when handling the result from a flow and an error occurs, you can get access to what type of error occurred using the Constants class. Extracting the error:

import com.simprints.libsimprints.Constants;

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {

   super.onActivityResult(requestCode, resultCode, data)

   // ensure that the result status is OK
   if (resultCode != Activity.RESULT_OK) {

      //...code to extract the error that occurred
      // using the Constants class

      // for instance, an error due to invalid project id
      boolean isProjectIdError = resultCode == Constants.SIMPRINTS_INVALID_PROJECT_ID


   } else {
      //...code to handle success case
   }
}

Data Authentication Errors

Related to configuration data or authentication errors:

  • SIMPRINTS_VERIFY_GUID_NOT_FOUND_ONLINE - returned when the unique id that was passed, is not found on the server

  • SIMPRINTS_VERIFY_GUID_NOT_FOUND_OFFLINE - returned when the unique id that was passed, is not found on the device

Configuration Errors

Related to configuration errors:

  • SIMPRINTS_INVALID_PROJECT_ID - returned when an invalid project ID is used

  • SIMPRINTS_DIFFERENT_PROJECT_ID - returned when a project ID used, is different from the one used to authenticate the app

  • SIMPRINTS_INVALID_USER_ID - returned when an invalid user ID is used

  • SIMPRINTS_DIFFERENT_USER_ID - returned when a user ID used is different from the one used to log in

  • SIMPRINTS_INVALID_MODULE_ID - returned when the module ID doesn't exist

  • SIMPRINTS_INVALID_METADATA - returned when the metadata has an invalid format or value

  • SIMPRINTS_INVALID_VERIFY_GUID - returned when an invalid unique ID verify GUID

  • SIMPRINTS_AGE_GROUP_NOT_SUPPORTED - returned when the age group of the subject is not supported by the current project configuration

Other errors:

  • SIMPRINTS_UNEXPECTED_ERROR

  • SIMPRINTS_ROOTED_DEVICE

  • SIMPRINTS_LOGIN_NOT_COMPLETE

  • SIMPRINTS_ENROLMENT_LAST_BIOMETRICS_FAILED

  • SIMPRINTS_BLUETOOTH_NOT_SUPPORTED

  • SIMPRINTS_BLUETOOTH_NO_PERMISSION

  • SIMPRINTS_FINGERPRINT_CONFIGURATION_ERROR

  • SIMPRINTS_FACE_CONFIGURATION_ERROR

  • SIMPRINTS_LICENSE_MISSING

  • SIMPRINTS_LICENSE_INVALID

  • SIMPRINTS_BACKEND_MAINTENANCE_ERROR

  • SIMPRINTS_PROJECT_PAUSED

  • SIMPRINTS_PROJECT_ENDING

Last updated

Logo