{"record":{"id":"aa28e760a6915eef","repo":"odysseus-dev/odysseus","slug":"not-authenticated-aa28e7","errorCode":null,"errorMessage":"Not authenticated","messagePattern":"Not authenticated","errorType":"http","errorClass":"HTTPException","httpStatus":401,"severity":"error","filePath":"routes/gallery/gallery_routes.py","lineNumber":997,"sourceCode":"            return _image_to_dict(img)\n        except HTTPException:\n            raise\n        except Exception:\n            db.rollback()\n            logger.exception(\"patch_gallery_image: update failed\")\n            raise HTTPException(500, \"Image update failed\")\n        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","sourceCodeStart":979,"sourceCodeEnd":1015,"githubUrl":"https://github.com/odysseus-dev/odysseus/blob/f9235ebbf13f693a6fd29ce70b097f6ec83705bf/routes/gallery/gallery_routes.py#L979-L1015","documentation":"Error \"Not authenticated\" 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":["Log in and retry the request.","Refresh the session; the login may have expired."],"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"}