[PR #15441] [MERGED] 15353 add better script error message #14595

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/15441
Author: @arthanson
Created: 3/14/2024
Status: Merged
Merged: 5/17/2024
Merged by: @jeremystretch

Base: developHead: 15353-script-error


📝 Commits (2)

  • 80802a4 15353 add better script error message
  • 157e89b Simplify _get_script_class() & add docstring

📊 Changes

4 files changed (+74 additions, -38 deletions)

View changed files

📝 netbox/extras/models/scripts.py (+2 -0)
📝 netbox/extras/views.py (+27 -6)
📝 netbox/templates/extras/script.html (+35 -30)
📝 netbox/templates/extras/script/source.html (+10 -2)

📄 Description

Fixes: #15353

Better error handling if the script module can't load (for example a syntax error). Instead of crashing an error message of what error occurred is displayed.

Monosnap NewBranchScript | NetBox 2024-03-14 15-07-39


🔄 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/15441 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 3/14/2024 **Status:** ✅ Merged **Merged:** 5/17/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `15353-script-error` --- ### 📝 Commits (2) - [`80802a4`](https://github.com/netbox-community/netbox/commit/80802a4357b89d65df0faf7ae7ca2024e1cbad88) 15353 add better script error message - [`157e89b`](https://github.com/netbox-community/netbox/commit/157e89ba0b377616e56a64388c6e9ad8de9592e5) Simplify _get_script_class() & add docstring ### 📊 Changes **4 files changed** (+74 additions, -38 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/models/scripts.py` (+2 -0) 📝 `netbox/extras/views.py` (+27 -6) 📝 `netbox/templates/extras/script.html` (+35 -30) 📝 `netbox/templates/extras/script/source.html` (+10 -2) </details> ### 📄 Description ### Fixes: #15353 Better error handling if the script module can't load (for example a syntax error). Instead of crashing an error message of what error occurred is displayed. ![Monosnap NewBranchScript | NetBox 2024-03-14 15-07-39](https://github.com/netbox-community/netbox/assets/99642/fd8787fd-4f11-49cc-b0de-52935c10ae94) --- <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:25:24 +01:00
adam closed this issue 2025-12-29 23:25:24 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14595