From d998eba967fb62a060aa118d7f170d6ae7911cbb Mon Sep 17 00:00:00 2001 From: Tessa Walsh Date: Wed, 8 Jan 2025 16:21:08 -0500 Subject: [PATCH] Make more explicit error message for large thumbnails --- backend/btrixcloud/colls.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/btrixcloud/colls.py b/backend/btrixcloud/colls.py index d9ab766aa9..08101c91c7 100644 --- a/backend/btrixcloud/colls.py +++ b/backend/btrixcloud/colls.py @@ -762,7 +762,10 @@ async def stream_iter(): flush=True, ) await self.storage_ops.delete_file_object(org, thumbnail_file) - raise HTTPException(status_code=400, detail="upload_failed") + raise HTTPException( + status_code=400, + detail="Upload failed: maxiumum thumbnail size (2 MB) exceeded", + ) if coll.thumbnail: if not await self.storage_ops.delete_file_object(org, coll.thumbnail):