Simprints Documentation
  • Introduction
    • Goals
    • Audience
    • Disclaimer
  • Product Overview
    • Product Overview
      • Simprints ID (SID)
        • Enrolment
        • Verification
        • Indentification
      • Biometrics
        • Fingerprints Recognition
          • Vero Fingerprint Scanners
        • Face Recognition
      • SID Intents Launcher
      • Cloud Backend
      • Data Collection Platforms
        • DHIS2
        • CommCare
        • ODK + Survey CTO
  • Architecture
    • System architecture
      • Mobile
        • Simprints ID (SID)
          • Project structure
          • Biometric flow orchestration
  • Installation
    • Installation, Quick Start and Device Requirements
      • Installation
      • Quick Start Guide
      • Device Requirements
  • Security & Privacy
    • Security & Privacy Considerations
      • Security Policy
      • Responsible Use
      • Privacy Policy
      • Cookie Policy
  • Development
    • Getting setup
    • Simprints for Developers
      • Simprints for Developers
      • Integrating with Simprints
        • Getting Started
        • Enrollment
        • Identification
        • Verification
        • Exit Forms
        • Confidence Score Bands
        • Enrolment & Identification +
        • Handling Errors
        • Metadata
      • Other Intergrations
        • ODK Integrations + SurveyCTO
          • Enrol
          • Identify
          • Verify
          • FAQ
        • CommCare Integration
          • CommCare: Enrolment
          • Identification
          • FAQs
          • ↔️CoSync
        • DHIS2
  • Troubleshooting
    • FAQs
    • Common Issues
  • Community & Support
    • Support Channels
    • Community Guidelines
    • Open Source Contributions
  • Product Roadmap
    • Product Roadmap
      • Current Releases
      • Previous Releases
      • Submit an Idea or Request
  • Licence
  • Contribution Guidelines
    • Contribution Guidelines
      • Code Contributions
      • Bug Reports
      • Feature Requests
  • Supporting Partners
Powered by GitBook
LogoLogo
On this page
  • How to Handle Errors
  • Data Authentication Errors
  • Configuration Errors
  • Other errors:

Was this helpful?

Edit on GitHub
  1. Development
  2. Simprints for Developers
  3. Integrating with Simprints

Handling Errors

PreviousEnrolment & Identification +NextMetadata

Last updated 8 months ago

Was this helpful?

How to Handle Errors

When a biometric flow fails, it can be due to a number of reasons outside an . 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:


val simprintsLauncher = registerForActivityResult(SimprintsContract()) { response ->
    
    if (response.resultCode != Activity.RESULT_OK) {
       // the result code will correspond to one of the pre-defined constants

        when (response.resultCode) {
            Constants.SIMPRINTS_INVALID_PROJECT_ID -> {
             // the error is due to invalid project ID
            }
            // handle other codes
        }
    }
 
    // handle response data
}

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

exit form