Skip to main content
This page describes the error responses you might encounter when using the Hirebase API and how to handle them.

Error Response Format

All error responses from the Hirebase API follow FastAPI’s standard shape — a single top-level detail 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

200 OK
success
The request was successful.
400 Bad Request
error
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).
401 Unauthorized
error
Authentication is required or the provided credentials are invalid.
403 Forbidden
error
The authenticated user does not have permission to access the requested resource.
404 Not Found
error
The requested resource does not exist.
422 Unprocessable Entity
error
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.
429 Too Many Requests
error
The client has sent too many requests in a given amount of time (rate limiting).
500 Internal Server Error
error
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 a 422 Unprocessable Entity with an array of Pydantic v2 field errors under detail:
Other common shapes:
Custom validators (e.g. an invalid job_category) return type: "value_error" and may include a ctx object:
Each object includes:
  • 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 be null for missing fields).
  • ctx — optional extra context on some value_error responses.

Authentication Errors (401)

Missing key on page 2+:
Missing key on an endpoint that always requires auth:
Invalid or revoked key:

Rate Limiting Errors (429)

Most search endpoints are rate-limited at 4 requests per second. Back off and retry with exponential delay.

Error Handling Best Practices

For transient errors (such as rate limiting or temporary server issues), implement an exponential backoff retry mechanism:
Before sending requests to the API, validate user input on the client side to catch common issues:
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:
  1. Check if the error message provides clear instructions on how to fix the issue
  2. Consult the documentation for the specific endpoint you’re using
  3. 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