Skip to content

Fixes #17: Stop reporting Script form errors as load failures - #71

Merged
jnovinger merged 1 commit into
mainfrom
17-errors-in-custom-script-forms-are-reported-as-source-loading
Oct 29, 2026
Merged

jnovinger merged 1 commit into
mainfrom
17-errors-in-custom-script-forms-are-reported-as-source-loading

Conversation

@pheus

@pheus pheus commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Fixes: #17

Errors from a Script's constructor or run form are no longer reported as source-loading failures. The Run tab, REST run action and runcustomscript now preserve the original exception, while keeping the revision loaded throughout form processing.

Comment thread netbox_scripts/api/views.py Fixed
A Script's own exception from its constructor or run form now reaches
NetBox's error handling unchanged on the Run tab, the REST run action
and runcustomscript. Each of them catches load failures only while it
loads the class, and the revision's import context still spans the
form.

Fixes #17
@pheus
pheus force-pushed the 17-errors-in-custom-script-forms-are-reported-as-source-loading branch from a0edcbb to 3178959 Compare October 29, 2026 14:56
@pheus
pheus marked this pull request as ready for review October 29, 2026 15:37
@pheus
pheus requested a review from jnovinger October 29, 2026 15:37
@jnovinger
jnovinger merged commit 978704c into main Oct 29, 2026
20 checks passed
@jnovinger
jnovinger deleted the 17-errors-in-custom-script-forms-are-reported-as-source-loading branch October 29, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Errors in custom Script forms are reported as source-loading failures

3 participants