odysseus-dev/odysseus · error · HTTPException
Tag update failed
Error message
Tag update failed
What it means
Error "Tag update failed" thrown in odysseus-dev/odysseus.
Source
Thrown at routes/gallery/gallery_routes.py:1065
# AI-suggested values you never added.
@router.post("/api/gallery/clear-user-tags")
async def clear_gallery_user_tags(request: Request) -> Dict[str, Any]:
user = get_current_user(request)
db = SessionLocal()
try:
q = db.query(GalleryImage).filter(GalleryImage.is_active == True)
q = _owner_filter(q, user)
cleared = 0
for img in q.all():
if img.tags:
img.tags = ''
cleared += 1
db.commit()
return {"ok": True, "cleared": cleared}
except Exception:
db.rollback()
logger.exception("clear_gallery_user_tags: failed")
raise HTTPException(500, "Tag update failed")
finally:
db.close()
# ---- POST /api/gallery/clear-ai-tags ----
# Wipe the `ai_tags` field on every image owned by the current user.
# Leaves user `tags` intact. Use when AI-suggested tags like "dog" /
# "woman" have leaked into the gallery and you want them gone.
@router.post("/api/gallery/clear-ai-tags")
async def clear_gallery_ai_tags(request: Request, image_id: Optional[str] = Query(None)) -> Dict[str, Any]:
user = get_current_user(request)
db = SessionLocal()
try:
q = db.query(GalleryImage).filter(GalleryImage.is_active == True)
q = _owner_filter(q, user)
if image_id: # clear just one photo's AI tags
q = q.filter(GalleryImage.id == image_id)
cleared = 0
for img in q.all():View on GitHub (pinned to f9235ebbf1)
Solutions
- Retry the tag update; check server logs if it persists.
- Verify the image ids and tag names are valid.
When it happens
Trigger: Triggered when the corresponding server-side validation or runtime check at the recorded location rejects the request or operation and returns this error message to the caller.
Common situations: See trigger scenarios.
AI-assisted analysis of odysseus-dev/odysseus@f9235ebbf1 (2026-08-14).
Data as JSON: /api/errors/502086af384019a4.
Report an issue: GitHub.