Remove exception
This commit is contained in:
@ -46,7 +46,6 @@ async def upload_file(file: UploadFile = File(...)) -> Dict[str, str]:
|
|||||||
the .html if it was a video.
|
the .html if it was a video.
|
||||||
"""
|
"""
|
||||||
domain_url = ""
|
domain_url = ""
|
||||||
try:
|
|
||||||
if file.content_type.startswith("video/"):
|
if file.content_type.startswith("video/"):
|
||||||
return await do_things(file)
|
return await do_things(file)
|
||||||
|
|
||||||
@ -60,10 +59,6 @@ async def upload_file(file: UploadFile = File(...)) -> Dict[str, str]:
|
|||||||
send_webhook(f"{domain_url} was uploaded.")
|
send_webhook(f"{domain_url} was uploaded.")
|
||||||
return {"html_url": domain_url}
|
return {"html_url": domain_url}
|
||||||
|
|
||||||
except Exception as exception:
|
|
||||||
send_webhook(f"{domain_url}:\n{exception}")
|
|
||||||
return {"error": f"Something went wrong: {exception}"}
|
|
||||||
|
|
||||||
|
|
||||||
@app.get("/", response_class=HTMLResponse)
|
@app.get("/", response_class=HTMLResponse)
|
||||||
async def main(request: Request):
|
async def main(request: Request):
|
||||||
|
Reference in New Issue
Block a user