Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide traceback in rendered config #18061

Closed
alehaa opened this issue Nov 21, 2024 · 3 comments · Fixed by #18127
Closed

Hide traceback in rendered config #18061

alehaa opened this issue Nov 21, 2024 · 3 comments · Fixed by #18127
Assignees
Labels
complexity: low Requires minimal effort to implement status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@alehaa
Copy link
Contributor

alehaa commented Nov 21, 2024

NetBox version

v4.1.6

Feature type

Change to existing functionality

Triage priority

I volunteer to perform this work (if approved)

Proposed functionality

When a rendered configuration template raises an exception, the full traceback is included in the Rendered Config pane. I suggest limiting this to the exception type and message.

Use case

End users without a programming background might be confused by seeing the full traceback. Seeing only the error message may be more helpful to them for resolving the problem.

Database changes

None.

External dependencies

None.

@alehaa alehaa added status: needs triage This issue is awaiting triage by a maintainer type: feature Introduction of new functionality to the application labels Nov 21, 2024
@bctiemann bctiemann added complexity: low Requires minimal effort to implement status: accepted This issue has been accepted for implementation labels Nov 22, 2024 — with Linear
@bctiemann bctiemann removed the status: needs triage This issue is awaiting triage by a maintainer label Nov 22, 2024
@bctiemann
Copy link
Contributor

Seems reasonable. It might be helpful if you could include a screenshot of the current behavior in the issue description so we can evaluate the before/after UX.

@sdktr
Copy link
Contributor

sdktr commented Nov 22, 2024

What if you actually want to see the full traceback to fix/better understand the issue?

@alehaa
Copy link
Contributor Author

alehaa commented Nov 30, 2024

@sdktr As far as I know, the traceback doesn't contain any useful information for tracing problems inside the template. Instead, it contains the call stack of how the template is rendered. So I've created a PR to limit that information, as it's usually not helpful to non-dev users at all.

I see the benefit of adding information about where a template error occurs. However, as far as I know, only the TemplateSyntaxError exception provides additional information such as line numbers. If you have suggestions for tweaking the error message to make it more useful, feel free to comment my PR and I'll see if I can integrate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity: low Requires minimal effort to implement status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants