Error Response Format
All API errors follow a consistent JSON format to help you quickly identify and resolve issues.Standard Error Response
Always
false for error responsesA human-readable description of the error
Detailed error information
HTTP Status Codes
The Mindhunters API uses standard HTTP status codes to indicate success or failure.Success Codes (2xx)
Client Error Codes (4xx)
Server Error Codes (5xx)
Common Errors
Authentication Errors
401 Unauthorized - Missing Token
Authorization: Bearer YOUR_API_TOKEN header in your request.
401 Unauthorized - Invalid Token
403 Forbidden - Insufficient Permissions
Validation Errors
422 Unprocessable Entity - Missing Required Field
422 Unprocessable Entity - Invalid Format
422 Unprocessable Entity - Invalid UUID
550e8400-e29b-41d4-a716-446655440000).
Resource Errors
404 Not Found - Resource
404 Not Found - Endpoint
Rate Limit Errors
429 Too Many Requests
retryAfter (seconds).
Server Errors
500 Internal Server Error
503 Service Unavailable
Error Handling Best Practices
Always check response status
Always check response status
Never assume a request succeeded. Always check the HTTP status code and handle errors appropriately.
Implement retry logic
Implement retry logic
Implement exponential backoff for transient errors (5xx, 429). Don’t retry client errors (4xx) except after fixing the issue.Retry: 429, 500, 502, 503
Don’t retry: 400, 401, 403, 404, 422
Log errors with context
Log errors with context
Log errors with request IDs, timestamps, and relevant context for debugging.
Validate before sending
Validate before sending
Validate request data on the client side before sending to reduce validation errors.
Handle errors gracefully
Handle errors gracefully
Provide user-friendly error messages instead of exposing technical details.
Monitor error rates
Monitor error rates
Track error rates and patterns in your monitoring system. Set up alerts for unusual error spikes.
Complete Error Handling Example
Here’s a comprehensive example with proper error handling:Troubleshooting Guide
Quick Diagnostics
1
Check authentication
Verify your API token is correct and hasn’t been revoked. Test with a simple GET request.
2
Validate request format
Ensure your request body is valid JSON and includes all required fields.
3
Check tenant/subdomain
Verify you’re using the correct tenant in your base URL.
4
Review API logs
Check the Monitoring dashboard for detailed error information.
5
Test with cURL
Isolate the issue by testing with a simple cURL command.
Common Issues and Solutions
Getting Support
If you continue to experience errors after troubleshooting:Check API Logs
Review detailed logs in your dashboard
Email Support
Contact support@mindhunters.ai with request details and log IDs
Documentation
Review endpoint-specific documentation
Status Page
Check status.mindhunters.ai for ongoing incidents
Information to Include
When contacting support, please provide:- Request ID from the error response or logs
- Timestamp when the error occurred
- Endpoint you were calling
- Request payload (sanitized - remove sensitive data)
- Error response received
- Expected behavior
Next Steps
Monitoring
Learn to track and debug API issues
API Reference
Explore all available endpoints
Best Practices
Follow our quickstart guide
Webhooks
Set up event notifications
