srbhr/Resume-Matcher · error · HTTPException

Resume has no processed data.

Error message

Resume has no processed data.

What it means

Raised by generate_enhancements in apps/backend/app/routers/enrichment.py when the resume exists but has no processed_data field. Enhancement generation builds its analysis prompt from processed_data, so a 400 is returned.

Source

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

            detail="Failed to analyze resume. Please try again.",
        )


@router.post("/enhance", response_model=EnhancementPreview)
async def generate_enhancements(request: EnhanceRequest) -> EnhancementPreview:
    """Generate enhanced descriptions from user answers.

    Takes the answers to clarifying questions and uses AI to generate
    improved description bullets for each item.
    """
    # Fetch resume
    resume = await db.get_resume(request.resume_id)
    if not resume:
        raise HTTPException(status_code=404, detail="Resume not found")

    processed_data = resume.get("processed_data")
    if not processed_data:
        raise HTTPException(
            status_code=400,
            detail="Resume has no processed data.",
        )

    # Group answers by item_id.
    # When all answers carry item_id (from the analysis step), we can skip
    # the expensive re-analysis LLM call and derive item details from the
    # resume's processed_data directly.
    answers_by_item: dict[str, list[AnswerInput]] = {}
    item_details: dict[str, dict] = {}
    # question_id → question dict, populated only in the legacy path
    questions_by_id: dict[str, dict] = {}

    if all(a.item_id for a in request.answers) and all(
        _extract_item_from_resume(processed_data, a.item_id or "")
        for a in request.answers
    ):
        # Fast path — no re-analysis needed

View on GitHub (pinned to 116f9cc3b0)

Solutions

  1. Re-upload the resume to regenerate processed_data
  2. Ensure the analyze step completed successfully before calling /enhance
  3. Inspect the resume document in the DB to confirm which fields are missing
  4. Migrate legacy records through the processing pipeline
Defensive patterns

Strategy: validation

Validate before calling

const resume = await api.getResume(request.resumeId);
if (!resume?.processed_data) throw new Error('Run analysis/re-upload first: no processed data');

Type guard

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

Try / catch

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

Prevention

When it happens

Trigger: Calling /enhance for a resume record whose processed_data is missing/empty — incomplete prior processing, legacy records, or DB manipulation that stripped the field.

Common situations: Legacy/migrated resume records lacking processed_data; an earlier analyze call failed and the pipeline never stored processed data; partial DB restores.

Related errors


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