Skip to main content

Error Handling

The Fribl API uses standard HTTP status codes and returns JSON error bodies to indicate what went wrong.

Error response format

All error responses follow this structure:
{
  "error": "Human-readable error description"
}

HTTP status codes

CodeMeaningWhen it occurs
200OKRequest succeeded
400Bad RequestInvalid request body, missing required fields, invalid file format, or weight sum exceeds 1.0
401UnauthorizedMissing or invalid X-API-KEY header
404Not FoundRequested CV, job, or match does not exist
429Too Many RequestsRate limit exceeded
500Internal Server ErrorUnexpected server-side failure
502Bad GatewayUpstream service error (sourcing endpoints)
503Service UnavailableRequired external service is not configured (sourcing endpoints)

Common error examples

Invalid API key

{
  "error": "Invalid API Key."
}
Fix: Verify your X-API-KEY header contains a valid key.

Missing required field

{
  "error": "Missing required fields."
}
Fix: Ensure your request body includes all required fields. For analyze endpoints, the inputs field must be a non-empty array of strings.

Resource not found

{
  "error": "CV not found"
}
Fix: Verify the ID exists and that the resource has finished processing. Check with the status endpoint first.

Match weight validation

{
  "error": "Sum of weights cannot be greater than 1"
}
Fix: Ensure that experience + hardSkills + softSkills + education in your weights object does not exceed 1.0.

Processing statuses

CV and job analysis is asynchronous. After submitting a document, poll the status endpoint to track progress. Each task moves through these statuses:
StatusMeaning
PENDINGTask has been created and is queued for processing
PROCESSINGDocument is actively being analyzed
COMPLETEDAnalysis is finished — retrieve results or run matching
FAILEDAnalysis failed — resubmit the document
Poll the status endpoint at reasonable intervals (e.g., every 2–3 seconds) rather than in a tight loop. Typical analysis completes within a few seconds.