Error Response Format
All error responses from the Hirebase API follow a consistent format:Common Status Codes
The request was successful.
The request was malformed or contained invalid parameters.
Authentication is required or the provided credentials are invalid.
The authenticated user does not have permission to access the requested resource.
The requested resource does not exist.
The request was well-formed but contains semantic errors or validation failures.
The client has sent too many requests in a given amount of time (rate limiting).
Something went wrong on the server side. These errors should be reported to the Hirebase team.
Detailed Error Types
Validation Errors
When a request fails validation, the API returns a 422 Unprocessable Entity status code with details about the validation failures:Authentication Errors
When authentication fails, you’ll typically see:Rate Limiting Errors
When you’ve exceeded your rate limit:retry_after field indicates the number of seconds to wait before retrying the request.
Error Handling Best Practices
Implement Retry Logic
Implement Retry Logic
For transient errors (such as rate limiting or temporary server issues), implement an exponential backoff retry mechanism:
Validate User Input
Validate User Input
Before sending requests to the API, validate user input on the client side to catch common issues:
Centralize Error Handling
Centralize Error Handling
Create a central error handling system in your application to process API errors consistently:
Common Error Scenarios and Solutions
| Error | Possible Cause | Solution |
|---|---|---|
| 400 Bad Request | Malformed JSON or query parameters | Double-check your request format and parameters |
| 401 Unauthorized | Invalid or expired API key | Verify your API key is correct and not expired |
| 404 Not Found | Job or company ID doesn’t exist | Verify the ID is correct and the resource exists |
| 422 Unprocessable Entity | Validation error in request data | Check the error details for specific field issues |
| 429 Too Many Requests | Rate limit exceeded | Implement rate limiting and retry with backoff |
| 500 Internal Server Error | Server-side issue | Contact support with the error details and timestamp |
Getting Help
If you encounter persistent errors or need additional assistance:- Check if the error message provides clear instructions on how to fix the issue
- Consult the documentation for the specific endpoint you’re using
- Contact support at spencer@hirebase.org with:
- The full error message and status code
- The endpoint you were trying to access
- A sample of your request (with sensitive data removed)
- Timestamp of when the error occurred