logo
Get StartedError Handling

Error Handling

The TexAu V3 API uses standard HTTP status codes and returns JSON error responses.

HTTP Status Codes

CodeMeaningBilled?
200SuccessYes
201CreatedYes
400Bad Request — invalid parametersNo
403Forbidden — missing or invalid API keyNo
404Not Found — unknown endpoint or resourceNo
429Too Many Requests — monthly quota exceededNo
500Internal Server ErrorNo
502Bad Gateway — upstream service errorNo
504Gateway Timeout — upstream service timed outNo

Error Response Format

All errors return a JSON object with an error field:

{
  "error": "Description of what went wrong"
}

Common Errors

Missing or Invalid API Key (403)

curl https://v3-api.texau.com/api/v1/enrich_profile
# No x-api-key header
{
  "message": "Forbidden"
}

Fix: Add a valid x-api-key header to every request. Both missing and invalid keys return the same 403 Forbidden response.

Unknown Endpoint (404)

curl https://v3-api.texau.com/api/v1/nonexistent \
  -H "x-api-key: YOUR_API_KEY"
{
  "error": "Unknown API: nonexistent",
  "available_apis": ["enrich_profile", "enrich_company", ...]
}

Fix: Check the endpoint name. The available_apis list shows all valid endpoints.

Quota Exceeded (429)

{
  "error": "Monthly quota exceeded",
  "api": "enrich_profile",
  "limit": 100000,
  "current": 100000
}

Fix: Wait until the next month or contact us for a higher limit.

Upstream Error (502)

{
  "error": "Authentication with provider failed"
}

Fix: This is a server-side issue. Retry your request. If the problem persists, contact support.

Timeout (504)

{
  "error": "Provider timeout or connection error",
  "detail": "..."
}

Fix: The request took too long. Retry with a smaller batch size or try again later.

Retry Strategy

We recommend exponential backoff for retries:

import time
import requests

def call_api(url, data, api_key, max_retries=3):
    for attempt in range(max_retries):
        response = requests.post(
            url,
            json=data,
            headers={
                "x-api-key": api_key,
                "Content-Type": "application/json"
            }
        )

        if response.status_code == 200:
            return response.json()

        if response.status_code in (429, 502, 504):
            wait = 2 ** attempt  # 1s, 2s, 4s
            time.sleep(wait)
            continue

        # Non-retryable error
        response.raise_for_status()

    raise Exception("Max retries exceeded")

Rate Limiting Headers

The API does not currently return rate limit headers. Use the /usage endpoint to check your current consumption against your monthly quota.