mirror of
https://github.com/flibusta-apps/fb2converter_server.git
synced 2025-12-06 15:05:37 +01:00
Update messages
This commit is contained in:
@@ -33,7 +33,9 @@ async def convert(
|
|||||||
):
|
):
|
||||||
format_lower = format.lower()
|
format_lower = format.lower()
|
||||||
if format_lower not in ["epub", "mobi"]:
|
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()
|
temp_uuid = uuid.uuid1()
|
||||||
|
|
||||||
@@ -68,7 +70,9 @@ async def convert(
|
|||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
pass
|
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]:
|
async def result_iterator() -> AsyncIterator[bytes]:
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user