Updated route dispatch to properly handle aiohttp HTTP exceptions.
CI / Formatting (push) Successful in 21s
CI / Linting (push) Successful in 4s
CI / Tests (Python 3.12) (push) Successful in 2m53s
CI / Tests (Python 3.13) (push) Successful in 2m52s
CI / Tests (Python 3.14) (push) Successful in 2m42s
CI / Type Checking (push) Successful in 9s
CI / Spelling (push) Successful in 5s
CI / Formatting (push) Successful in 21s
CI / Linting (push) Successful in 4s
CI / Tests (Python 3.12) (push) Successful in 2m53s
CI / Tests (Python 3.13) (push) Successful in 2m52s
CI / Tests (Python 3.14) (push) Successful in 2m42s
CI / Type Checking (push) Successful in 9s
CI / Spelling (push) Successful in 5s
This commit is contained in:
@@ -205,7 +205,7 @@ async def create_submit(ctx: RouteContext) -> web.Response:
|
||||
|
||||
# Redirect to the mod's voting page.
|
||||
vote_url = ctx.routes.url_for(f"/vote/{token}")
|
||||
return web.HTTPFound(vote_url)
|
||||
raise web.HTTPFound(vote_url)
|
||||
|
||||
|
||||
@on_route("/vote/{token}", methods=["GET"])
|
||||
@@ -293,7 +293,7 @@ async def vote_submit(ctx: RouteContext) -> web.Response:
|
||||
|
||||
# Redirect back to the voting page.
|
||||
vote_url = ctx.routes.url_for(f"/vote/{token}")
|
||||
return web.HTTPFound(vote_url)
|
||||
raise web.HTTPFound(vote_url)
|
||||
|
||||
|
||||
@on_route("/vote/{token}/events", streaming=True)
|
||||
@@ -379,7 +379,7 @@ async def mod_end(ctx: RouteContext) -> web.Response:
|
||||
|
||||
await manager.end()
|
||||
results_url = ctx.routes.url_for("/results")
|
||||
return web.HTTPFound(results_url)
|
||||
raise web.HTTPFound(results_url)
|
||||
|
||||
|
||||
@on_route("/vote/{token}/cancel", methods=["POST"])
|
||||
|
||||
Reference in New Issue
Block a user