Opened at 2020-09-17T20:59:54Z
Last modified at 2023-09-05T14:20:22Z
#3420 assigned defect
Twisted web Resources should "return ErrorPage" instead of "raise WebError"
Reported by: | sajith | Owned by: | sajith |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | code-frontend-web | Version: | n/a |
Keywords: | Cc: | ||
Launchpad Bug: |
Description (last modified by sajith)
In case of errors, twisted.web Resource instances should be responding with an error page, instead of throwing an exception. Any raise WebError instances we have in Tahoe WUI should be replaced with return ErrorPage.
More background is in this discussion at GitHub about a PR that solves #3382.
Sub-tickets:
- #3422 - allmydata/web/directory.py should return error pages instead of raising WebError
- #3423 - allmydata/web/filenode.py should return error pages instead of raising WebError
- #3424 - allmydata/web/operations.py should return error pages instead of raising WebError
- #3425 - allmydata/web/root.py should return error pages instead of raising WebError
- #3426 - allmydata/web/status.py should return error pages instead of raising WebError
- #3427 - allmydata/web/unlinked.py should return error pages instead of raising WebError
- #3429 - allmydata/web/check_result.py should return error pages instead of raising WebError
Change History (7)
comment:1 Changed at 2020-09-17T21:00:21Z by sajith
- Component changed from unknown to code-frontend-web
- Milestone changed from undecided to Support Python 3
- Owner set to sajith
- Status changed from new to assigned
comment:2 Changed at 2020-09-18T17:59:01Z by exarkun
comment:3 Changed at 2020-09-18T18:02:21Z by exarkun
- Description modified (diff)
comment:4 Changed at 2020-09-18T18:12:24Z by exarkun
- Description modified (diff)
comment:5 Changed at 2020-09-18T19:06:38Z by sajith
- Description modified (diff)
comment:6 Changed at 2020-10-20T18:20:28Z by exarkun
This is somewhat mitigated by the work for ticket:3422 which introduced the @render_exception decorator which will transform an exception into an ErrorPage?.
This may still be a sensible change to make but we don't need it to fully escape Nevow at this point.
Though all the currently linked sub-tickets are resolved there are still some parts of the web code that do raise WebError. I think we just didn't get around to filing tickets for them.
comment:7 Changed at 2023-09-05T14:20:22Z by itamarst
- Milestone Support Python 3 deleted
Ticket retargeted after milestone closed
This is probably worth splitting up. The changes will be spread out across a lot of the web code and have little overlap (apart from a few shared error page helpers that will come pretty early, I suspect).