srbhr/Resume-Matcher · error · HTTPException
Failed to save changes. Please try again.
Error message
Failed to save changes. Please try again.
What it means
A 500 raised by apply_regenerated_items when saving the merged regenerated content to the database throws an unexpected exception. The error is logged server-side with the underlying exception; the client only sees a generic save-failure message.
Source
Thrown at apps/backend/app/routers/enrichment.py:801
detail=(
"Resume content changed or could not be uniquely matched. "
"Please regenerate and try again."
),
)
# Update the resume in database
updated_content = json.dumps(updated_data, indent=2)
try:
await db.update_resume(
resume_id,
{
"content": updated_content,
"processed_data": updated_data,
},
)
except Exception as e:
logger.error(f"Failed to save regenerated content to database: {e}")
raise HTTPException(
status_code=500,
detail="Failed to save changes. Please try again.",
)
return {
"message": "Changes applied successfully",
"updated_items": len(regenerated_items),
}
View on GitHub (pinned to 116f9cc3b0)
Solutions
- Retry the apply request — the failure may be transient (check server logs for the underlying exception)
- Verify database connectivity and that the resumes table schema accepts the updated fields
- Inspect server logs for 'Failed to save regenerated content to database' to find the real exception
- If schema-related, fix the payload shape or run the pending migration
Example fix
// before: blind retry loop
await applyRegenerated(resumeId, items);
// after: retry transient failures with backoff
try {
await applyRegenerated(resumeId, items);
} catch (e) {
if (e.response?.status === 500) await sleep(1000); // then retry once
else throw e;
} Defensive patterns
Strategy: retry
Validate before calling
// Nothing to pre-validate (server-side save failure); ensure payload size is sane before sending
if (JSON.stringify(payload).length > 1_000_000) throw new Error('Payload too large'); Try / catch
try {
await api.post(`/enrichment/${resumeId}/apply-regenerated`, payload);
} catch (e) {
if (e.response?.status === 500) {
await retryWithBackoff(() => api.post(`/enrichment/${resumeId}/apply-regenerated`, payload), { retries: 2 });
} else throw e;
} Prevention
- Check server logs for the underlying DB exception before assuming a client bug
- Retry transient 500s with exponential backoff and jitter
- Keep processed_data within DB size limits
- Monitor DB health/pool saturation during enrichment operations
When it happens
Trigger: Database connection failure or timeout during the resume update write; a schema/validation error in updated_content or processed_data rejected by the DB layer; any exception raised inside the update call after items were matched.
Common situations: DB pool exhausted or Postgres restarted; processed_data grew past a size limit; a migration changed the resumes table so the update payload no longer fits the schema.
Related errors
- Could not create master resume.
- 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/f557db26137182f5.
Report an issue: GitHub.