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

Raised by analyze_resume in apps/backend/app/routers/enrichment.py when the resume exists but its processed_data field is empty/missing. The analysis prompt is built from processed_data, so without it the endpoint returns 400 and asks the user to re-upload.

Source

Thrown at apps/backend/app/routers/enrichment.py:102

    return {}


@router.post("/analyze/{resume_id}", response_model=AnalysisResponse)
async def analyze_resume(resume_id: str) -> AnalysisResponse:
    """Analyze a resume to identify items that need enrichment.

    Uses AI to examine Experience and Projects sections for weak,
    vague, or incomplete descriptions and generates clarifying questions.
    """
    # Fetch resume
    resume = await db.get_resume(resume_id)
    if not resume:
        raise HTTPException(status_code=404, detail="Resume not found")

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

    # Build prompt with content language
    resume_json = json.dumps(processed_data)
    language = get_content_language()
    output_language = get_language_name(language)
    prompt = ANALYZE_RESUME_PROMPT.format(
        resume_json=resume_json,
        output_language=output_language
    )

    try:
        # Call LLM with increased max_tokens for non-English languages
        result = await asyncio.wait_for(
            complete_json(prompt, max_tokens=8192, schema_type="enrichment"),
            timeout=180.0,  # 3-minute hard limit

View on GitHub (pinned to 116f9cc3b0)

Solutions

  1. Re-upload the resume so the processing pipeline regenerates processed_data
  2. Check the upload/parse pipeline logs for the resume to see why processed_data was not saved
  3. If it's a legacy record, reprocess it or migrate it to include processed_data
  4. Guard client UX by checking processed_data presence before calling analyze

Example fix

// before
if (!resume.processedData) await analyzeResume(resume.id)
// after
if (!resume.processedData) { await reuploadResume(file); } else { await analyzeResume(resume.id); }
Defensive patterns

Strategy: validation

Validate before calling

const resume = await api.getResume(resumeId);
if (!resume?.processed_data) throw new Error('Resume has no processed data; re-upload required');

Type guard

function hasProcessedData(r) { return r != null && r.processed_data != null && Object.keys(r.processed_data).length > 0; }

Try / catch

try { await api.analyzeResume(id); } catch (e) { if (e.status === 400 && /processed data/.test(e.detail)) { await promptReupload(); } else throw e; }

Prevention

When it happens

Trigger: Calling analyze on a resume whose processing/parsing step never completed or stored no processed_data (failed upload pipeline, legacy record created before processed_data was introduced, or manual DB insertion).

Common situations: Resumes migrated from an older schema without processed_data; uploads that failed after the record row was created; DB partially reset losing the processed payload.

Related errors


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