Skip to main content
Blindfold uses standard HTTP status codes to indicate the success or failure of API requests. All error responses include detailed information to help you debug issues.

HTTP Status Codes

Success Codes

Meaning: Request succeeded.When: All API methods (tokenize, detokenize, mask, redact, hash, synthesize, encrypt) return 200 on success.Example Response:

Client Error Codes

Meaning: Malformed request or missing parameters.Common Causes:
  • Missing required text parameter
  • Invalid JSON format
  • Invalid entity type specified
  • Invalid configuration parameters
  • Empty text field
Example Response:
How to Fix:
  • Verify all required fields are present
  • Check JSON formatting
  • Ensure text field is not empty
  • Validate entity type names
Meaning: Missing or invalid API key.Common Causes:
  • Missing X-API-Key header
  • Invalid API key
  • Expired API key
  • API key deleted or revoked
Example Response:
How to Fix:
  • Verify you’re sending the X-API-Key header
  • Check your API key is correct
  • Generate a new API key in the dashboard
  • Ensure API key hasn’t been revoked
Meaning: Rate limit exceeded.Common Causes:
  • Too many requests in short time period
  • Exceeded plan quota
  • Burst limit reached
Example Response:
Plan Limits:
  • Free: 500K characters/month, 5K chars per request
  • Pay As You Go: Unlimited characters, 500K chars per request
How to Fix:
  • Implement exponential backoff
  • Use the retry_after value from response
  • Batch multiple texts into single requests
  • Upgrade to Pay As You Go for unlimited usage

Server Error Codes

Meaning: Unexpected server-side error.Common Causes:
  • Temporary service disruption
  • Internal processing error
  • Database connectivity issue
Example Response:
How to Fix:
  • Retry the request after a few seconds
  • If error persists, contact support with request_id
  • Check status page for service status
If you receive 500 errors frequently, contact support@blindfold.dev with the request_id.
Meaning: Service temporarily unavailable.Common Causes:
  • Scheduled maintenance
  • System overload
  • Deployment in progress
Example Response:
How to Fix:
  • Wait and retry after the retry_after period
  • Check maintenance schedule
  • Implement automatic retry logic

Error Response Format

All error responses follow a consistent format:

Fields Explained

  • detail: User-friendly error message explaining what went wrong
  • error: Machine-readable error code for programmatic handling
  • status_code: HTTP status code
  • request_id: Unique identifier for the request (present in 5xx errors)

Handling Errors in Your Code

Python SDK

The Python SDK raises specific exceptions for different error types:

JavaScript SDK

The JavaScript SDK throws typed errors:

REST API (cURL)

When using the REST API directly, check the HTTP status code:

Retry Logic

Exponential Backoff

Implement exponential backoff for transient errors (429, 500, 503):

JavaScript Retry Example

Best Practices

Log Request IDs

Always log the request_id for 5xx errors. This helps support diagnose issues quickly.

Implement Retry Logic

Use exponential backoff for rate limits and server errors. Respect the retry_after value.

Validate Before Sending

Validate input locally before making API calls to avoid 400 errors.

Monitor Error Rates

Track error rates in your application. Sudden increases may indicate issues.

Common Error Scenarios

Scenario 1: Authentication Failure

Scenario 2: Missing Required Field

Scenario 3: Rate Limit Exceeded

Getting Help

If you encounter persistent errors:

Contact Support

Email support@blindfold.dev with the request_id from error responses.

Status Page

Check current service status and maintenance schedules

API Reference

Full API documentation with request/response examples

See Also

Rate Limits

Learn about rate limits and quotas

Python SDK

Python SDK error handling

JavaScript SDK

JavaScript SDK error handling

REST API

Complete API reference