srbhr/Resume-Matcher · critical · HTTPException
Failed to improve resume. Please try again.
Error message
Failed to improve resume. Please try again.
What it means
HTTP 500 catch-all raised by improve_resume_endpoint for any unhandled exception during the resume improvement pipeline (AI calls, diff calculation, refinement, persistence). The real cause is only visible in the server log line 'Resume improvement failed: {e}'.
Source
Thrown at apps/backend/app/routers/resumes.py:1523
# Diff metadata
diff_summary=diff_summary,
detailed_changes=detailed_changes,
refinement_stats=refinement_stats,
ats_score=_build_ats_score(
improved_data,
job_keywords,
refinement_result,
refinement_successful,
),
warnings=response_warnings,
refinement_attempted=refinement_attempted,
refinement_successful=refinement_successful,
),
)
except Exception as e:
logger.error(f"Resume improvement failed: {e}")
raise HTTPException(
status_code=500,
detail="Failed to improve resume. Please try again.",
)
@router.patch("/{resume_id}", response_model=ResumeFetchResponse)
async def update_resume_endpoint(
resume_id: str, resume_data: ResumeData
) -> ResumeFetchResponse:
"""Update a resume with new structured data."""
existing = await db.get_resume(resume_id)
if not existing:
raise HTTPException(status_code=404, detail="Resume not found")
updated_data = resume_data.model_dump()
updated_content = json.dumps(updated_data, indent=2)
updated = await db.update_resume(View on GitHub (pinned to 116f9cc3b0)
Solutions
- Check backend logs for the 'Resume improvement failed: {e}' line to find the root cause
- Retry the request — transient AI provider failures often resolve on retry
- Verify AI provider credentials, quotas, and network connectivity from the backend
- Reduce input size or retry later if the provider is rate-limited or down
Example fix
// server log shows: Resume improvement failed: RateLimitError: 429
// after: add backoff around the AI call in the pipeline
for attempt in range(3):
try:
return await call_llm(prompt)
except RateLimitError:
await asyncio.sleep(2 ** attempt) Defensive patterns
Strategy: retry
Try / catch
async function improveWithRetry(req, attempts = 3) {
for (let i = 0; i < attempts; i++) {
try { return await improveResume(req); }
catch (e) {
if (e.status === 500 && i < attempts - 1) { await sleep(1000 * 2 ** i); continue; }
if (e.status === 500) logServerSideHint('Check backend logs: Resume improvement failed');
throw e;
}
}
} Prevention
- Monitor backend logs for 'Resume improvement failed: {e}' to find root causes
- Keep AI provider API keys, quotas, and egress networking healthy
- Add timeouts and retry with backoff around AI calls in the pipeline
- Alert on 500 spikes from this endpoint
When it happens
Trigger: AI provider timeout/rate limit or malformed response, exception in diff computation, refinement step failing, database write errors, or a bug in any pipeline stage not caught earlier.
Common situations: LLM API key invalid/quota exhausted, upstream AI service outage, oversized resume inputs, network egress blocked from the backend, or a code regression after a deploy.
Related errors
- Failed to load resume (status ${res.status}).
- Failed to delete resume (status ${res.status}): ${text}
- Failed to update cover letter (status ${res.status}): ${text
- Failed to update outreach message (status ${res.status}): ${
- Failed to rename resume (status ${res.status}): ${text}
AI-assisted analysis of srbhr/Resume-Matcher@116f9cc3b0 (2026-08-28).
Data as JSON: /api/errors/4256fb47fc6f971d.
Report an issue: GitHub.