Custom 404 template not being used #1451

Closed
opened 2025-12-29 16:32:16 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Dec 13, 2017).

Issue type

[ ] Feature request
[x] Bug report
[ ] Documentation

Environment

  • Python version: 3.5.2
  • NetBox version: 2.2.7

Description

When requesting a resource which does not exist, NetBox returns a generic server error page indicating a 404 error, rather than using the custom 404.html template. This is due to the introduction of ExceptionHandlingMiddleware, which does not properly pass Http404 exceptions.

Originally created by @jeremystretch on GitHub (Dec 13, 2017). ### Issue type [ ] Feature request <!-- An enhancement of existing functionality --> [x] Bug report <!-- Unexpected or erroneous behavior --> [ ] Documentation <!-- A modification to the documentation --> ### Environment * Python version: 3.5.2 * NetBox version: 2.2.7 ### Description When requesting a resource which does not exist, NetBox returns a generic server error page indicating a 404 error, rather than using the custom `404.html` template. This is due to the introduction of `ExceptionHandlingMiddleware`, which does not properly pass Http404 exceptions.
adam added the type: bug label 2025-12-29 16:32:16 +01:00
adam closed this issue 2025-12-29 16:32:16 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1451