feat(api): Invalid ID error message
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user