srbhr/Resume-Matcher · error · ValueError

personalInfo.name is required

Error message

personalInfo.name is required

What it means

ResumeWizardFinalizeRequest's model validator _validate_ready_to_finalize blocks finalization when state.resume_data.personalInfo.name is empty or whitespace-only. A master resume cannot be generated without a name, so the validator raises this ValueError.

Source

Thrown at apps/backend/app/schemas/resume_wizard.py:104

            raise ValueError("answer is required for answer actions")
        return self


class ResumeWizardTurnResponse(BaseModel):
    """Response for one wizard turn."""

    state: ResumeWizardState


class ResumeWizardFinalizeRequest(BaseModel):
    """Request to create the master resume from the wizard draft."""

    state: ResumeWizardState

    @model_validator(mode="after")
    def _validate_ready_to_finalize(self) -> "ResumeWizardFinalizeRequest":
        if not self.state.resume_data.personalInfo.name.strip():
            raise ValueError("personalInfo.name is required")
        return self


class ResumeWizardFinalizeResponse(BaseModel):
    """Response after creating the master resume."""

    message: str
    request_id: str
    resume_id: str
    processing_status: Literal["ready"] = "ready"
    is_master: bool

View on GitHub (pinned to 116f9cc3b0)

Solutions

  1. Populate resume_data.personalInfo.name before finalizing (prompt the user or use a fallback)
  2. Check the wizard state after each turn and require a non-blank name before enabling finalize
  3. If the LLM should infer the name, verify the intro turn merged it into personalInfo
  4. Re-run or repair the state rather than calling the finalize endpoint

Example fix

// before
ResumeWizardFinalizeRequest(state=state)  # state.resume_data.personalInfo.name == ""
// after
if not state.resume_data.personalInfo.name.strip():
    state.resume_data.personalInfo.name = user_provided_or_fallback_name
ResumeWizardFinalizeRequest(state=state)
Defensive patterns

Strategy: validation

Validate before calling

def can_finalize(state: ResumeWizardState) -> bool:
    return bool(state.resume_data.personalInfo.name.strip())

Type guard

def has_name(state: ResumeWizardState) -> bool:
    return state.resume_data.personalInfo.name.strip() != ""

Try / catch

try:
    req = ResumeWizardFinalizeRequest.model_validate(body)
except ValidationError as e:
    raise HTTPException(422, "a resume name is required before finalizing") from e

Prevention

When it happens

Trigger: Submitting a finalize request whose state.resume_data.personalInfo.name is "", " ", or never set by earlier wizard turns.

Common situations: User skips the intro/name question and tries to finalize; LLM merge failed to populate personalInfo; name fallback logic didn't run (e.g. deterministic name fallback missed); state carried over from an older session schema.

Understand the failure class

Background: "Missing required field" and "field is required" errors: why libraries reject payloads that omit mandatory fields — this error's family across 20 libraries.

Related errors


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