Add an error page to handle masked objects
We catch MaskedObjectException at the webapp level and display a specific error page. The page lists the opaque identifier of the masking requests and the legal email address where to send inquiries. We also add support for MaskedObjectException in API responses. Thanks to @anlambert for deduplicating the error templates and fixtures. Thanks to @vlorentz for improving the wording of the error page.
parent
9b9c8190
No related branches found
No related tags found
Showing
- swh/web/api/apiresponse.py 10 additions, 4 deletionsswh/web/api/apiresponse.py
- swh/web/api/tests/test_apiresponse.py 17 additions, 0 deletionsswh/web/api/tests/test_apiresponse.py
- swh/web/browse/tests/views/conftest.py 25 additions, 0 deletionsswh/web/browse/tests/views/conftest.py
- swh/web/browse/tests/views/test_content.py 21 additions, 0 deletionsswh/web/browse/tests/views/test_content.py
- swh/web/browse/tests/views/test_directory.py 17 additions, 0 deletionsswh/web/browse/tests/views/test_directory.py
- swh/web/browse/tests/views/test_origin.py 23 additions, 0 deletionsswh/web/browse/tests/views/test_origin.py
- swh/web/browse/tests/views/test_release.py 18 additions, 1 deletionswh/web/browse/tests/views/test_release.py
- swh/web/browse/tests/views/test_revision.py 23 additions, 1 deletionswh/web/browse/tests/views/test_revision.py
- swh/web/browse/tests/views/test_snapshot.py 25 additions, 1 deletionswh/web/browse/tests/views/test_snapshot.py
- swh/web/utils/exc.py 59 additions, 0 deletionsswh/web/utils/exc.py
- swh/web/webapp/templates/includes/error-base.html 38 additions, 0 deletionsswh/web/webapp/templates/includes/error-base.html
- swh/web/webapp/templates/includes/http-error.html 5 additions, 27 deletionsswh/web/webapp/templates/includes/http-error.html
- swh/web/webapp/templates/includes/masking-error.html 38 additions, 0 deletionsswh/web/webapp/templates/includes/masking-error.html
- swh/web/webapp/templates/masked.html 20 additions, 0 deletionsswh/web/webapp/templates/masked.html
Loading
Please register or sign in to comment