HHS / simpler-grants-pdf-builder

PDF builder that's used by the SimplerNOFOs project, part of the Simpler Grants initiative at HHS.
4 stars 1 forks source link

Admin external link checker #29

Closed pcraig3 closed 1 week ago

pcraig3 commented 1 week ago

Summary

This PR adds an external link checker for superadmin users.

Sometimes when we use the external link checker, we see that some URL statuses fail even though it is possible to visit them in the browser. When this happens, it is generally not obvious what the issue is.

When I've investigated this in the past, I have been adding code manually to print the entire response and/or save to a file, which has worked but is not a good way to do things. This PR creates an actual page for us to do this in a nicer way, available only to superadmins. I don't expect we will need to use this very often but it is also pretty lightweight and will save me some time.

page with successful URL page with bad URL
Shows title, status code, and response if needed. Shows the Error we are getting from requests. No status code because this is an exception.
Screenshot 2024-11-05 at 10 16 06 AM Screenshot 2024-11-05 at 10 16 20 AM
pcraig3 commented 1 week ago

Merging in!