Skip to main content

Error Response Format

Every REST API error (/connect/v1/...) returns the same JSON envelope:

Response Fields

The HTTP status code is the response status. It is not repeated in the body.
The OIDC endpoints (/auth, /token, /userinfo) use the OAuth 2.0 error format instead: { "error": "invalid_client", "error_description": "client authentication failed" } in the response body, or error and error_description query parameters on the redirect from /auth. For example, /token returns invalid_grant for an expired or already-used authorization code. The codes on this page apply to the REST API.

Error Code Structure

Error codes follow a string-based, domain-prefixed structure:
  • Format: CATEGORY_ERROR_NAME
  • Categories:
    • AUTH_* - Authentication errors
    • VALIDATION_* - Validation errors
    • SESSION_* - Session management errors
    • PROVIDER_* - Provider-specific errors
    • WORKFLOW_* - Workflow errors
    • SYSTEM_* - System errors
    • RESOURCE_* - Resource errors

Authentication Errors

error
Code: AUTH_INVALID_CREDENTIALS HTTP Status: 401Invalid client credentials (Client ID or Client Secret incorrect)Common Causes:
  • Wrong Client ID or Client Secret
  • Using sandbox credentials in production or vice versa
  • Credentials have been rotated
error
Code: AUTH_INVALID_GRANT HTTP Status: 400Invalid grant provided (OAuth2 standard error)Common Causes:
  • Authorization code has expired
  • Authorization code has been used already
error
Code: AUTH_INVALID_CLIENT HTTP Status: 401Client authentication failed (OAuth2 standard error)Common Causes:
  • Client doesn’t exist
  • Client is disabled
  • Authentication method not allowed for client
error
Code: AUTH_FORBIDDEN HTTP Status: 403Access denied. The authenticated user does not have permission to access the requested resource.Common Causes:
  • Unauthorized origin attempting access
  • Insufficient permissions for the resource
  • Action not allowed for the authenticated client
Example Response:
error
Code: AUTH_DATA_PROTECTED HTTP Status: 403The verification was created with privateMode enabled, so its user data cannot be read.Common Causes:
  • Calling GET /verifications/{verificationId}, /userinfo, or /evidence for a verification created with privateMode: true

Validation Errors

error
Code: VALIDATION_MISSING_PARAMETER HTTP Status: 400Required parameter is missing from the requestCommon Causes:
  • Missing required query parameters
  • Missing required body fields
  • Empty request body
error
Code: VALIDATION_INVALID_PARAMETER HTTP Status: 400Parameter value is invalidCommon Causes:
  • Invalid format (e.g., email, URL)
  • Value out of allowed range
  • Unsupported parameter value
error
Code: VALIDATION_UNPROCESSABLE HTTP Status: 422The request is well-formed but cannot be processed as sent.Common Causes:
  • requestedLoa is higher than the eID provider supports
  • matchData sent to a provider that does not compare values, or missing for a provider that does
error
Code: VALIDATION_MISSING_USER_DATA HTTP Status: 400Required user data is missingCommon Causes:
  • Provider didn’t return required attributes
  • User didn’t consent to required scopes
error
Code: VALIDATION_INVALID_USER_DATA HTTP Status: 422User data format is invalidCommon Causes:
  • Malformed data from provider
  • Data validation failed
error
Code: VALIDATION_REDIRECT_URI_REQUIRED HTTP Status: 400Redirect URI is required but not providedCommon Causes:
  • No default redirect URI configured
  • Public client without redirect URI

Session Management Errors

error
Code: SESSION_NOT_FOUND HTTP Status: 404Session does not existCommon Causes:
  • Invalid session ID
  • Session has expired
  • Session was deleted
error
Code: SESSION_VERIFICATION_NOT_FOUND HTTP Status: 404Verification session not foundCommon Causes:
  • Invalid verification ID
  • Verification has expired
  • Wrong environment (sandbox vs production)
error
Code: SESSION_INVALID_STATUS_TRANSITION HTTP Status: 409Invalid session status transitionCommon Causes:
  • Session already completed
  • Session was cancelled
  • Attempting invalid state change
error
Code: SESSION_INVALID_FLOW HTTP Status: 400Invalid verification flowCommon Causes:
  • Unsupported flow type for provider
  • Flow parameters are invalid
  • Flow not enabled for application

Provider Errors

error
Code: PROVIDER_NOT_FOUND HTTP Status: 404Provider not foundCommon Causes:
  • Invalid provider ID
  • Provider not available in region
  • Typo in provider identifier
error
Code: PROVIDER_NOT_ACTIVATED HTTP Status: 403The requested eID is not activated for this applicationCommon Causes:
  • Activation for the eID has not been requested, is still in progress, or was rejected
  • The eID is not offered in this environment (sandbox or production)
Action: Complete activation for this eID in the Console, or use the environment where the eID is offered.
error
Code: PROVIDER_DISABLED_IN_WORKFLOW HTTP Status: 403The eID is activated, but the selected workflow does not enable itCommon Causes:
  • The eID is turned off in the workflow’s verification node
  • The request uses a workflow other than the one where the eID is enabled
Action: Enable the eID in the workflow, or use a workflow where it is enabled.
error
Code: PROVIDER_INITIALIZATION_FAILED HTTP Status: 502Provider initialization failedCommon Causes:
  • Provider service is down
  • Network connectivity issues
  • Invalid provider configuration
error
Code: PROVIDER_ERROR HTTP Status: 502Generic provider errorCommon Causes:
  • Provider returned an error
  • Provider timeout
  • Unexpected provider response
error
Code: PROVIDER_UNAVAILABLE HTTP Status: 503Provider service is unavailableCommon Causes:
  • Provider maintenance
  • Provider service outage
  • Rate limited by provider
error
Code: PROVIDER_CONFIGURATION_ERROR HTTP Status: 400The provider configuration is invalid or incomplete.Common Causes:
  • Missing required configuration values
  • Invalid configuration format
  • Incomplete provider setup
Example Response:
error
Code: PROVIDER_AUTHENTICATION_FAILED HTTP Status: 401Authentication with the eID provider failed.Common Causes:
  • Invalid provider credentials
  • Provider API key expired
  • Authentication token invalid
Example Response:
error
Code: PROVIDER_UNEXPECTED_RESPONSE HTTP Status: 502The provider returned an unexpected or invalid response.Common Causes:
  • Empty response from provider
  • Malformed response data
  • Unexpected response format
Example Response:

Workflow Errors

error
Code: WORKFLOW_NOT_CONFIGURED HTTP Status: 409The app has no workflow, so there is nothing to verify againstAction: Create a workflow in the Console and enable the eID in it.

System Errors

error
Code: SYSTEM_INTERNAL_ERROR HTTP Status: 500Internal server errorCommon Causes:
  • Unexpected system error
  • Database connection issues
  • Configuration errors
Action: Contact support if persists
error
Code: SYSTEM_UNSUPPORTED_MODE HTTP Status: 501Requested mode or feature is not supportedCommon Causes:
  • Feature not implemented
  • Deprecated functionality
  • Invalid operation mode

Resource Errors

Generic resource errors for CRUD operations.
error
Code: RESOURCE_NOT_FOUND HTTP Status: 404The requested resource was not found.Common Causes:
  • Invalid resource identifier
  • Resource has been deleted
  • Resource does not exist
Example Response:
error
Code: RESOURCE_CONFLICT HTTP Status: 409A conflict occurred with the current state of the resource (e.g., duplicate entry).Common Causes:
  • Resource already exists with the same identifier
  • Duplicate entry attempt
  • Concurrent modification conflict
Example Response:

Request-Level Errors

Errors raised outside the verification logic (request validation, an unknown route, unexpected failures) use lowercase codes in the same envelope. On the Workspace API (/connect/v1/apps/...), request validation and unexpected failures return VALIDATION_INVALID_PARAMETER and SYSTEM_INTERNAL_ERROR instead.
Example

Error Categories

Errors are categorized for proper handling:

Error Handling Best Practices

Retry Strategy

User Communication

Error Context

Always include relevant context when logging errors:

Support

For persistent errors or issues not covered here:

Developer Support

Email: support@hopae.comInclude in your report:
  • Error code
  • Timestamp
  • Verification ID (if available)
  • Environment (Sandbox/Production)
  • request_id from the error response