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

Most API errors follow this structure:
{
  "error": "Human-readable error description"
}
Update endpoints can also proxy structured validation errors from the ingestion service:
{
  "detail": {
    "message": "Update validation failed.",
    "invalid_skills": [
      {
        "id": "not-a-real-skill-id",
        "field": "hard_skills",
        "message": "Skill does not exist in the canonical graph/taxonomy."
      }
    ]
  }
}
Schema mismatches on update use 422 Unprocessable Entity with structured details:
{
  "detail": {
    "message": "Payload does not match VacancyUpdate schema for entity_type=Vacancy.",
    "schema": "VacancyUpdate",
    "errors": [
      {
        "type": "missing",
        "loc": ["information", "title"],
        "msg": "Field required"
      }
    ]
  }
}

HTTP status codes

CodeMeaningWhen it occurs
200OKRequest succeeded
400Bad RequestInvalid request body, missing required fields, invalid file format, weight sum exceeds 1.0, or update validation failed
401UnauthorizedMissing or invalid x-api-key header
404Not FoundRequested CV, job, or match does not exist
422Unprocessable EntityUpdate payload does not match the expected CV or job update schema
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.

Update validation failure

{
  "detail": {
    "message": "content_language is required and must be a valid ISO 639-1 language code."
  }
}
Fix: On PUT /jobs/{id} and PUT /cvs/{id}, always send content_language and use split hard_skills / soft_skills arrays with canonical lowercase relationship values: required, optional, satisfies.

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. The batch status endpoints can return these per-item statuses:
StatusMeaning
in_progressDocument is actively being analyzed
retryingA transient failure occurred and the job is being retried automatically
completedAnalysis is finished — retrieve results or run matching
failedAnalysis failed — resubmit the document
not_foundNo status record exists for that ID in the requested resource type
Poll the status endpoint at reasonable intervals (e.g., every 2–3 seconds) rather than in a tight loop. Continue polling while the status is in_progress or retrying. Typical analysis completes within a few seconds.