Error Handling

Understand how errors are returned and how to handle them safely in production.

SMARTe Enrich APIs return deterministic, structured errors. Errors are evaluated early in the request lifecycle and are returned consistently across all endpoints.

Error responses are designed to be machine-readable and predictable, allowing clients to implement reliable error-handling logic.


Error Response Format

All errors use the same response structure.

{
  "error": {
    "code": "invalid_parameter",
    "message": "Invalid input parameter.",
    "status": 400
  }
}

Each error response includes:

  • A machine-readable error code
  • A human-readable message
  • An HTTP status code

Error responses also include a smarteTransactionId in the response headers for traceability.


Common Error Categories

Errors are grouped by category to simplify handling. They can occur at different stages of request processing.

CategoryHTTP StatusDescription
Authentication & Authorization401Credential or access issues
Request Validation400Invalid or missing input
Credit & Usage Control402Insufficient credits
Rate Limiting429Request volume exceeded
Method Errors405Unsupported HTTP method
Platform Errors500Internal server error

Authentication & Authorization Errors

HTTP StatusError CodeMessageReturned WhenDeveloper Action
401unauthorizedAuthentication credentials are missing.No API key is providedProvide valid credentials
401invalid_api_keyInvalid API key.API key is invalid or malformedVerify API key

Validation Errors

HTTP StatusError CodeMessageReturned WhenDeveloper Action
400missing_identifierAt least one valid identifier must be provided.Required identifiers missingProvide supported identifiers
400invalid_parameterInvalid input parameter.Unsupported or malformed inputValidate inputs client-side

Credit Errors

HTTP StatusError CodeMessageReturned WhenDeveloper Action
402insufficient_creditsInsufficient credits to process the request.Credit balance exhaustedReplenish credits

Rate Limiting Errors

HTTP StatusError CodeMessageReturned WhenDeveloper Action
429rate_limit_exceededToo many requests. Please try again after some time.Request exceeds allowed thresholdRetry logic with backoff

HTTP Method Errors

HTTP StatusError CodeMessageReturned WhenDeveloper Action
405method_not_allowedHTTP method not supported for this endpoint.Unsupported HTTP method usedUse supported method

Platform Errors

HTTP StatusError CodeMessageReturned WhenDeveloper Action
500internal_errorAn unexpected error occurred while processing the request.Server-side failureRetry with backoff

💡

When contacting SMARTe Support, include:

  1. smarteTransactionId
  2. Timestamp
  3. Endpoint name
  4. Error code

What’s Next

Explore the API Reference for endpoint-specific errors.