Skip to content

🤖 Handle None values in exception interface attribute extraction #69676

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

Conversation

seer-by-sentry[bot]
Copy link
Contributor

👋 Hi there! This PR was automatically generated 🤖

Triggered by Jenn Mueng

Fixes SENTRY-Y88

This change updates the event_attribute.py file to enhance the robustness of the attribute extraction from exception interfaces in events. Specifically, in the list comprehension that retrieves attributes ('type' or 'value') from each exception in the event's exception interface, a check is added to ensure that the exception object is not None before attempting to access its attributes. This prevents potential errors that could arise from trying to access attributes of a None object, thereby improving the error handling capabilities of the code.

📣 Instructions for the reviewer which is you, yes you:

  • If these changes were incorrect, please close this PR and comment explaining why.
  • If these changes were incomplete, please continue working on this PR then merge it.
  • If you are feeling confident in my changes, please merge this PR.

This will greatly help us improve the autofix system. Thank you! 🙏

If there are any questions, please reach out to the AI/ML Team on #proj-autofix

🤓 Stats for the nerds:

Prompt tokens: 18864
Completion tokens: 1459
Total tokens: 20323

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 25, 2024
@jennmueng jennmueng added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Apr 25, 2024
Copy link

codecov bot commented Apr 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.85%. Comparing base (2bdf2a7) to head (a35e1f0).
Report is 1052 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #69676       +/-   ##
===========================================
- Coverage   91.24%   79.85%   -11.40%     
===========================================
  Files        2853     6468     +3615     
  Lines      177030   287627   +110597     
  Branches    31573    49577    +18004     
===========================================
+ Hits       161536   229684    +68148     
- Misses      15493    57551    +42058     
- Partials        1      392      +391     
Files Coverage Δ
src/sentry/rules/conditions/event_attribute.py 85.14% <100.00%> (ø)

... and 3621 files with indirect coverage changes

@getsantry getsantry bot added the Stale label May 17, 2024
@getsantry
Copy link
Contributor

getsantry bot commented May 17, 2024

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you add the label WIP, I will leave it alone unless WIP is removed ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot closed this May 25, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components Stale Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant