From 9f1d2d72edc1add36b7ff0253884b2527a658f46 Mon Sep 17 00:00:00 2001 From: Bulat Kurbanov Date: Mon, 27 Jun 2022 19:15:55 +0300 Subject: [PATCH] Update messages --- app/main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/main.py b/app/main.py index 1a15ad8..b172b1b 100644 --- a/app/main.py +++ b/app/main.py @@ -33,7 +33,9 @@ async def convert( ): format_lower = format.lower() if format_lower not in ["epub", "mobi"]: - raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST) + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, detail="Bad format!" + ) temp_uuid = uuid.uuid1() @@ -68,7 +70,9 @@ async def convert( except FileNotFoundError: pass - raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST) + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, detail="Can't convert!" + ) async def result_iterator() -> AsyncIterator[bytes]: try: