[PR #13509] [CLOSED] 12114 show filename and line number on 500 error page #14199

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/13509
Author: @arthanson
Created: 8/18/2023
Status: Closed

Base: developHead: 12114-500-show-filename


📝 Commits (1)

  • 816f3e0 12114 show filename and line number on 500 error page

📊 Changes

2 files changed (+7 additions, -1 deletions)

View changed files

📝 netbox/netbox/views/errors.py (+5 -1)
📝 netbox/templates/500.html (+2 -0)

📄 Description

Fixes: #12114

Adds the filename and line number to 500 page error report that is potentially useful in tracking down the error without exposing a security risk. Not as useful as a full stack trace, but as pointed out in the ticket it can sometimes help to quickly identify if it is in a plugin. Note however that it only shows the last line of the stack-trace which can be a library routine (for example a raised exception) - doing the full stack trace would give much better debugging info but is probably too much of a potential security leak?

Note: screenshot is from a raise exception, so in this specific case not very useful.

Monosnap Server Error 2023-08-18 12-43-26


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/13509 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 8/18/2023 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `12114-500-show-filename` --- ### 📝 Commits (1) - [`816f3e0`](https://github.com/netbox-community/netbox/commit/816f3e04d2b2d62545ea1bdec5a25173f07448f4) 12114 show filename and line number on 500 error page ### 📊 Changes **2 files changed** (+7 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `netbox/netbox/views/errors.py` (+5 -1) 📝 `netbox/templates/500.html` (+2 -0) </details> ### 📄 Description ### Fixes: #12114 Adds the filename and line number to 500 page error report that is potentially useful in tracking down the error without exposing a security risk. Not as useful as a full stack trace, but as pointed out in the ticket it can sometimes help to quickly identify if it is in a plugin. Note however that it only shows the last line of the stack-trace which can be a library routine (for example a raised exception) - doing the full stack trace would give much better debugging info but is probably too much of a potential security leak? Note: screenshot is from a raise exception, so in this specific case not very useful. ![Monosnap Server Error 2023-08-18 12-43-26](https://github.com/netbox-community/netbox/assets/99642/9a4f346f-2c83-4f45-8a05-7d75fa4a21ac) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:23:07 +01:00
adam closed this issue 2025-12-29 23:23:07 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14199