DICE Developer Docs
  • Developer Docs
    • DICE Test Drive
      • Sign-up for Issuer Portal
      • Issue Credentials
      • Verify Credentials
    • Key Concepts
      • DID & Verifiable Credentials
      • DICE ID Architecture
    • Platform Console
      • Dashboard
      • Customers
        • Onboard Customer
      • Credentials
        • Issue Credentials to New Customer
      • Schema
      • Batch Issuance
        • Batch Issuance - Useful Tips
      • Verifications
        • Verification Template
      • Templates
        • Certificate Template
          • Create Template
          • Manage Template
        • Email Template
          • Create Template
          • Manage Template
      • Organization
      • Departments
      • Organization Users
      • API Access
      • Callback Configuration
      • Tutorials
        • Credential Issuance from DICE ID Console
        • Credential Issuance using DICE ID APIs
        • Credential Verification using QR code
        • Credential Verification from DICE ID console
        • Batch Credential Issuance from DICE ID Console
    • Integrations
      • Auth0 Integration
        • Login using OIDC (First Factor Authentication)
        • Custom MFA Rule (For 2FA)
    • DICE ID SDK
      • DICE ID
        • DID & Verifiable Credentials
        • DICE ID Architecture
      • SDK Functionalities
      • Create Wallet
      • Create Connection
      • Creating a Schema
      • Issue a Credential
      • Send Presentation Request
      • Get Verification State
      • Configuration and Customization
      • Error Handling & Troubleshooting
      • Conclusion
      • Additional Resources
  • Getting Started with DICE ID Skill Credentials
    • Building Trust Ecosystems Powered by Credentials
    • DICE ID Integration for Issuers
    • DICE ID Integration for Verifiers
    • DICE ID Brand Usage Guidelines
    • DICE ID Onboarding Confirmation
    • Helpful Q&A
    • Troubleshooting Guide
Powered by GitBook
On this page
  1. Developer Docs
  2. DICE ID SDK

Error Handling & Troubleshooting

Best practices for error handling and troubleshooting

When using the DICE ID SDK, developers may encounter various errors, exceptions, and error codes. Here is a comprehensive list of possible issues and suggested best practices for error handling and troubleshooting:

  1. Network Errors:

  • Connection timeout: Handle this error by checking the network connectivity and retrying the operation if necessary.

  • DNS resolution failure: Verify the DNS configuration and ensure that the host is reachable. Retry the operation or notify the user about the issue.

  1. Authentication and Authorization Errors:

  • Invalid credentials: Ensure that the provided authentication credentials (e.g., wallet token) are correct and up to date.

  • Insufficient privileges: Check the user's access level and permissions. Ensure that the user has the necessary privileges to perform the requested operation.

  1. Data Validation Errors:

  • Invalid input data: Validate the input data before processing to ensure it meets the required format and constraints.

  • Missing or incomplete data: Handle situations where required data is missing or incomplete gracefully, and prompt the user to provide the necessary information.

  1. Server-side Errors:

  • Internal server error (HTTP 500): Notify the DICE ID service provider about the issue and retry the operation after some time.

  • Service unavailable (HTTP 503): Retry the operation after a delay. If the issue persists, contact the DICE ID service provider for support.

Possible Error Messages & Troubleshooting Steps

Not able to create wallet

  • Validate the API key: Double-check that the API key being used is valid and has not expired. Obtain a new API key if needed from the appropriate source.

  • Verify permissions: Make sure the API key used has the necessary permissions to create wallets.

  • Confirm wallet name and key: Ensure that you have entered the wallet name and key accurately. Any typos or incorrect information can cause the wallet creation to fail.

Error creating schema:

  1. Check your network connection: Ensure that you have a stable internet connection and try again.

  2. Validate the API key: Confirm that the API key used for the schema creation is valid and has not expired. If needed, obtain a new API key from the appropriate source.

  3. Verify permissions: Ensure that the API key has the necessary permissions to create schemas. Review the documentation or contact the provider for information on required permissions.

Failed to create connection invitation

  • Validate the API key: Confirm that the API key being used is valid and has not expired.

  • Check network connectivity: Ensure that you have a stable internet connection and try creating the connection invitation again.

  • Verify input parameters: Double-check that all the required input parameters, such as invitationInput, are provided accurately. Ensure that there are no typos or missing values.

Failed to issue credential

  • Validate the API key: Confirm that the API key being used is valid and has not expired. Obtain a new API key if needed from the appropriate source.

  • Verify the connection ID: Double-check that the ISSUER_CONNECTION_ID provided is correct and corresponds to a valid connection established with the recipient.

  • Validate the credential definition: Ensure that the CREDENTIAL_DEF variable accurately points to a valid credential definition that matches the intended credential type.

  • Verify the credential values: Check the cred_def_values array to ensure that the attribute names and corresponding values are accurately provided. Ensure that the required attributes are included and match the expected format.

Error in template creation

  • Validate the API key: Confirm that the API key (VERIFIER_XAPIKEY) being used is valid and has not expired. Obtain a new API key if needed from the appropriate source.

  • Verify the attribute values: Double-check the attribute names, filter names, and filter values provided in the templ_data array. Ensure they match the expected format and adhere to any guidelines or restrictions specified.

  • Check for syntax or formatting errors: Review the code for any syntax errors or missing parentheses, commas, or quotation marks that could cause issues with the function call.

Error sending presentation

  • Validate the API key: Confirm that the API key (VERIFIER_XAPIKEY) being used is valid and has not expired. Obtain a new API key if needed from the appropriate source.

  • Verify the connection and template IDs: Double-check the verifier connection ID and verifier template ID to ensure they are correctly assigned and correspond to existing connections and templates.

Error getting state

  • Verify the presentation exchange ID: Double-check the presentation exchange ID (PRESENTATION_EX_ID) to ensure it is correctly assigned and corresponds to an existing presentation exchange.

  • Check for syntax or formatting errors: Review the code for any syntax errors or missing parentheses, commas, or quotation marks that could cause issues with the function call.

  • Verify the network connection: Ensure that you have a stable internet connection and that there are no network disruptions that could interfere with retrieving the verification state.

PreviousConfiguration and CustomizationNextConclusion

Last updated 1 year ago