feat(api): Invalid ID error message

This commit is contained in:
AaronBenDaniel
2024-11-08 17:43:11 -05:00
parent 31b8d0c08c
commit d58a119c10
+8
View File
@@ -63,6 +63,7 @@ async def handle_download(
else:
cookies = None
try:
match mode:
case DownloadMode.story:
story_id = download_id
@@ -99,6 +100,13 @@ async def handle_download(
},
)
except KeyError:
# Invalid ID
return HTMLResponse(
status_code=404,
content='The story you tried to download does not exist or has been deleted. Support is available on the <a href="https://discord.gg/P9RHC4KCwd" target="_blank">Discord</a>',
)
app.mount("/", StaticFiles(directory=BUILD_PATH), "static")