Error Response Format
All error responses from the Hirebase API follow FastAPI’s standard shape — a single top-leveldetail field. For most errors detail is a string; for request-validation errors (422) it is an array of field-level error objects.
Read error messages from
response.detail — not response.error or response.message. There is no top-level error or message field.Common Status Codes
The request was successful.
A hand-rolled request error — for example, an unparseable date on
GET /v2/jobs/expired-jobs or an invalid search_type on vector search. Most field and type mismatches return 422 instead (see below).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 JSON or query parameters, but failed Pydantic validation (wrong type, missing required field, invalid enum value, etc.). This is FastAPI’s default for request-body and query-parameter 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 (422)
When a request fails validation, the API returns a422 Unprocessable Entity with an array of Pydantic v2 field errors under detail:
job_category) return type: "value_error" and may include a ctx object:
type— machine-readable error category (e.g.missing,list_type,string_type,value_error).loc— path to the offending field (e.g.["query", "since"]or["body", "visa"]).msg— human-readable explanation.input— the value that was rejected (may benullfor missing fields).ctx— optional extra context on somevalue_errorresponses.
Authentication Errors (401)
Missing key on page 2+:Rate Limiting Errors (429)
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
400 vs 422: Field and type validation failures (missing required params, wrong JSON types, invalid enum values) return 422 — FastAPI’s default. 400 is reserved for a small set of hand-rolled checks, such as an unparseable
since date on expired jobs or an invalid search_type on vector search.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