{"record":{"id":"9271429daab9ac86","repo":"odysseus-dev/odysseus","slug":"no-images-specified","errorCode":null,"errorMessage":"No images specified","messagePattern":"No images specified","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"routes/gallery/gallery_routes.py","lineNumber":1004,"sourceCode":"        finally:\n            db.close()\n\n    # ---- POST /api/gallery/download-zip ----\n    # Bundle the given image ids into a single .zip for download. Used by the\n    # gallery's bulk \"Download\" when many photos are selected (one file instead\n    # of a flood of individual downloads).\n    @router.post(\"/api/gallery/download-zip\")\n    async def gallery_download_zip(request: Request):\n        user = get_current_user(request)\n        if not user:\n            raise HTTPException(401, \"Not authenticated\")\n        try:\n            data = await request.json()\n        except Exception:\n            data = {}\n        ids = data.get(\"ids\") or []\n        if not ids:\n            raise HTTPException(400, \"No images specified\")\n        db = SessionLocal()\n        try:\n            imgs = db.query(GalleryImage).filter(\n                GalleryImage.id.in_(ids),\n                GalleryImage.owner == user,\n            ).all()\n            if not imgs:\n                raise HTTPException(404, \"No images found\")\n            import io\n            import re\n            import zipfile\n            buf = io.BytesIO()\n            used = set()\n            with zipfile.ZipFile(buf, \"w\", zipfile.ZIP_DEFLATED) as zf:\n                for img in imgs:\n                    src = _gallery_image_path(img.filename)\n                    if not src.exists():\n                        continue","sourceCodeStart":986,"sourceCodeEnd":1022,"githubUrl":"https://github.com/odysseus-dev/odysseus/blob/f9235ebbf13f693a6fd29ce70b097f6ec83705bf/routes/gallery/gallery_routes.py#L986-L1022","documentation":"Error \"No images specified\" thrown in odysseus-dev/odysseus.","triggerScenarios":"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.","commonSituations":"See trigger scenarios.","solutions":["Select at least one image before running the bulk operation.","Pass a non-empty list of image ids in the request."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f9235ebbf13f693a6fd29ce70b097f6ec83705bf","analyzedAt":"2026-08-14T21:47:48.359Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}