srbhr/Resume-Matcher · error · HTTPException
Could not create master resume.
Error message
Could not create master resume.
What it means
A 500 raised at the end of finalize_resume_wizard when any non-HTTPException error occurs during master resume creation (normalization, persistence, cleanup of old wizard resumes). The real cause is logged as 'Resume wizard finalize failed'; clients get this generic message.
Source
Thrown at apps/backend/app/routers/resume_wizard.py:123
resume.get("resume_id"),
e,
)
raise HTTPException(
status_code=409,
detail="A master resume already exists. Delete it before creating a new one.",
)
return ResumeWizardFinalizeResponse(
message="Master resume created.",
request_id=str(uuid4()),
resume_id=resume["resume_id"],
processing_status="ready",
is_master=resume.get("is_master", False),
)
except HTTPException:
raise
except Exception as e:
logger.error("Resume wizard finalize failed: %s", e)
raise HTTPException(status_code=500, detail="Could not create master resume.")
View on GitHub (pinned to 116f9cc3b0)
Solutions
- Check server logs for 'Resume wizard finalize failed' to find the underlying exception
- Retry finalize — transient DB failures often succeed on retry
- Validate request.state.resume_data contents before calling finalize (no nulls in required fields)
- Fix normalize_resume_data handling if the wizard state produces unsupported shapes
Example fix
// before
await api.post('/resume-wizard/finalize', { state });
// after
try {
await api.post('/resume-wizard/finalize', { state });
} catch (e) {
if (e.response?.status === 500) {
notify('Master resume creation failed — please retry');
} else throw e;
} Defensive patterns
Strategy: try-catch
Validate before calling
function isFinalizable(state) {
const rd = state?.resume_data;
return rd != null &&
Array.isArray(rd.experience) && rd.experience.every(e => e?.title && e?.company) &&
Array.isArray(rd.skills);
} Try / catch
try {
await api.post('/resume-wizard/finalize', { state });
} catch (e) {
if (e.response?.status === 500) {
showToast('Master resume creation failed; retrying...');
await retryWithBackoff(() => api.post('/resume-wizard/finalize', { state }), { retries: 1 });
} else throw e;
} Prevention
- Validate resume_data shape before finalize (required fields non-null)
- Retry 500s once with backoff; persist the wizard state so retries are lossless
- Check DB connectivity/constraints if finalize fails repeatedly
- Investigate 'Resume wizard finalize failed' logs to fix normalization gaps
When it happens
Trigger: db.create_master_resume (or equivalent save) fails — DB down, constraint violation; normalize_resume_data throws on unexpected wizard state content; cleanup of a previous non-master wizard resume raises an unexpected error outside its guarded try.
Common situations: Wizard resume_data contains values the normalizer doesn't handle (nulls, odd types from the AI); database constraint/size limits hit; DB connectivity lost between validation and write.
Related errors
- Failed to save changes. Please try again.
- Resume wizard failed. Please try again.
- ${data.detail || Failed to reset database (status ${res.stat
- Resume content changed or could not be uniquely matched. Ple
- No job descriptions provided
AI-assisted analysis of srbhr/Resume-Matcher@116f9cc3b0 (2026-08-28).
Data as JSON: /api/errors/32edb4ce2861d115.
Report an issue: GitHub.