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

python: Show line number when an exception occurs #7264

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

elro444
Copy link

@elro444 elro444 commented Dec 28, 2024

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • New Query Runner (Data Source)
  • New Alert Destination
  • Other

Description

When exceptions occurred in queries of the Python data source, you could not see where the error happened.
This PR fixes this and adds the line number where the exception was raised from.

Since the user will care about exceptions in their code, the shown line number will be the "deepest" entry in the stack trace that is from the user's code (from the query).

How is this tested?

  • Unit tests (pytest, jest)
  • E2E Tests (Cypress)
  • Manually
  • N/A

Manually added exceptions to my query, and saw that it properly showed the line number of the problematic line.

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

image

@elro444 elro444 force-pushed the python-add-exception-line-number branch from 9df485a to 4b9cb16 Compare December 28, 2024 18:02
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.

1 participant