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

success
The request was successful.
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).
error
Authentication is required or the provided credentials are invalid.
error
The authenticated user does not have permission to access the requested resource, or the endpoint’s feature is not on the account’s plan (X-Billing-Code: feature_missing).
error
The requested resource does not exist.
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.
error
Either the request rate limit (100 per 60 s per key, Retry-After present) or a plan quota (X-Billing-Code: limit_exceeded). See Rate Limiting and Quota below — only the first should be retried.
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)

All data endpoints require authentication on every request. Missing key/header on most endpoints:
Missing key on certain endpoints (expired jobs, exports, insights):
Invalid or revoked key:
"Sign in to access this endpoint" 401s also carry the header X-Billing-Code: auth_required — branch on that instead of string-matching detail. ("Missing authorization header" responses do not include it.)

Feature Errors (403)

An API key whose plan does not include the endpoint’s feature gets a 403 with X-Billing-Code: feature_missing:
Every plan, including Free, includes the job, company, vector, export, and insights endpoints; this applies to add-on features such as hiring-manager contacts.

Rate Limiting Errors (429)

API traffic is rate-limited per API key: 100 requests per 60 seconds. (Anonymous requests to data endpoints are rejected with 401 before rate limiting; the 25-per-60-seconds per-IP limit applies only to public reference and marketing endpoints.) All responses carry X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers; when you exceed the limit, the 429 includes a Retry-After header (seconds):

Quota Errors (429)

A different 429 — with header X-Billing-Code: limit_exceeded — means you’ve exhausted your plan’s included usage for a meter this billing period:
The check runs before the request executes, using the most it could cost (the requested limit on per-result endpoints). When that does not fit in the remaining allowance, the same 429 tells you how many units are left so you can retry with a smaller limit:
Do not retry quota 429s with backoff — the answer will not change until the period resets or the plan is upgraded. Distinguish the two by X-Billing-Code (quota) vs Retry-After (rate limit). Quota 429s also include the full set of usage headers so you can see which meter is exhausted and when the period resets.

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