odysseus-dev/odysseus · error · HTTPException

Image deletion failed

Error message

Image deletion failed

What it means

Error "Image deletion failed" thrown in odysseus-dev/odysseus.

Source

Thrown at routes/gallery/gallery_routes.py:1252

                                rows_to_delete.append(prev)
                    else:
                        meta["tool_events"] = new_events
                        m.meta_data = _json.dumps(meta)
                for m in rows_to_delete:
                    db.delete(m)
                if msgs:
                    db.commit()
            except Exception as _e:
                # Cleanup is best-effort — never block the delete itself.
                logger.warning(f"chat-history cleanup after image delete failed: {_e}")

            return {"status": "deleted", "id": image_id}
        except HTTPException:
            raise
        except Exception:
            db.rollback()
            logger.exception("delete_gallery_image: failed")
            raise HTTPException(500, "Image deletion failed")
        finally:
            db.close()

    # ---- POST /api/image/inpaint — proxy to diffusion server OR OpenAI ----
    @router.post("/api/image/inpaint")
    async def inpaint_proxy(request: Request):
        """Forward inpaint request. If the selected endpoint is OpenAI, re-shape
        the request for /v1/images/edits (multipart, inverted mask). Otherwise
        proxy through to a self-hosted diffusion server's /v1/images/inpaint."""
        import httpx
        user = require_privilege(request, "can_generate_images")
        body = await request.json()
        # Use endpoint from request body (editor dropdown) or fall back to DB lookup.
        # Store as requested_base to avoid carrying user input into the outbound request.
        requested_base = (body.pop("_endpoint", "") or "").rstrip("/")
        # SSRF hardening: validate a client-supplied endpoint before any
        # outbound request (mirrors routes/embedding_routes.py).
        if requested_base:

View on GitHub (pinned to f9235ebbf1)

Solutions

  1. Retry the deletion; check server logs for the underlying error.
  2. Verify the image still exists and the storage is writable.

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/d1533d687b5a6d8f. Report an issue: GitHub.