srbhr/Resume-Matcher · error · HTTPException

Resume has no processed data. Please re-upload the resume.

Error message

Resume has no processed data. Please re-upload the resume.

What it means

HTTP 400 raised by generate_cover_letter_endpoint when the tailored resume exists and its job context is valid, but the resume's 'processed_data' field (the structured parsed JSON of the resume) is empty or missing. Cover-letter generation builds its prompt from processed_data, so without it the request cannot proceed and the user is told to re-upload.

Source

Thrown at apps/backend/app/routers/resumes.py:1812

    if not improvement:
        raise HTTPException(
            status_code=400,
            detail="No job context found for this resume. "
            "The resume may have been created before job tracking was implemented.",
        )

    # Get the job description
    job = await db.get_job(improvement["job_id"])
    if not job:
        raise HTTPException(
            status_code=404,
            detail="The associated job description was not found.",
        )

    # Get resume data
    resume_data = resume.get("processed_data")
    if not resume_data:
        raise HTTPException(
            status_code=400,
            detail="Resume has no processed data. Please re-upload the resume.",
        )

    # Get language setting
    language = get_content_language()

    # Generate cover letter
    try:
        cover_letter_content = await generate_cover_letter(
            resume_data, job["content"], language
        )
    except Exception as e:
        logger.error(f"Cover letter generation failed: {e}")
        raise HTTPException(
            status_code=500,
            detail="Failed to generate cover letter. Please try again.",
        )

View on GitHub (pinned to 116f9cc3b0)

Solutions

  1. Re-upload the resume so it is re-parsed and processed_data is populated, then retry generation.
  2. If the original content exists, trigger a re-parse/reprocess endpoint to regenerate processed_data instead of a full re-upload.
  3. Check server logs for the original parse failure (quota, rate limits, malformed file) and fix the root cause first.
  4. Backfill processed_data for affected legacy resumes via a batch re-parse script.

Example fix

// before
await api.post(`/resumes/${resumeId}/generate-cover-letter`); // 400: no processed_data

// after
const resume = await api.get(`/resumes/${resumeId}`);
if (!resume.data.processed_data) {
  await api.post(`/resumes/${resumeId}/reprocess`); // or re-upload the file
}
await api.post(`/resumes/${resumeId}/generate-cover-letter`);
Defensive patterns

Strategy: validation

Validate before calling

const resume = await api.get(`/resumes/${resumeId}`);
if (!resume.data.processed_data) {
  throw new Error('Resume has no processed data — re-upload or reprocess first.');
}

Type guard

const hasProcessedData = (r) => r?.processed_data != null && typeof r.processed_data === 'object' && Object.keys(r.processed_data).length > 0;

Try / catch

try {
  await api.post(`/resumes/${resumeId}/generate-cover-letter`);
} catch (e) {
  if (e.response?.status === 400 && /no processed data/.test(e.response.data?.detail ?? '')) {
    notify('Re-parsing resume before generating the cover letter…');
    await api.post(`/resumes/${resumeId}/reprocess`);
    await api.post(`/resumes/${resumeId}/generate-cover-letter`);
  } else throw e;
}

Prevention

When it happens

Trigger: Cover-letter generation requested for a resume whose processed_data is null/empty — e.g. initial AI parsing failed or was interrupted, a migration dropped the field, or the resume record was created without the parse step completing.

Common situations: Parsing pipeline crashed after the resume row was saved but before processed_data was written; legacy imports missing the field; manual DB edits or storage cleanup removed the parsed JSON.

Related errors


AI-assisted analysis of srbhr/Resume-Matcher@116f9cc3b0 (2026-08-28). Data as JSON: /api/errors/546c78870d7a4e75. Report an issue: GitHub.