Skip to content

Handle iteration errors during frame traversal#239

Merged
untitaker merged 4 commits into
getsentry:masterfrom
leotrubach:master
Jan 18, 2019
Merged

Handle iteration errors during frame traversal#239
untitaker merged 4 commits into
getsentry:masterfrom
leotrubach:master

Conversation

@leotrubach

Copy link
Copy Markdown
Contributor

Fixes #238

Not sure if this is the best way to show it, i think it is better than showing just empty list. But maybe there could be some better way to show that exception occured during traversal.

There is more general problem that it is probably good to not iterate over queryset, so DB is not queried. Any ideas on how to do that?

@codecov-io

codecov-io commented Jan 18, 2019

Copy link
Copy Markdown

Codecov Report

Merging #239 into master will decrease coverage by 0.77%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #239      +/-   ##
=========================================
- Coverage   81.28%   80.5%   -0.78%     
=========================================
  Files          32      32              
  Lines        2703    2703              
  Branches      440     440              
=========================================
- Hits         2197    2176      -21     
- Misses        343     366      +23     
+ Partials      163     161       -2
Impacted Files Coverage Δ
sentry_sdk/utils.py 82.98% <100%> (ø) ⬆️
sentry_sdk/integrations/aws_lambda.py 0% <0%> (-19.63%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3efd8e7...f7de541. Read the comment docs.

@untitaker

Copy link
Copy Markdown
Member

I believe it would be appropriate to only traverse builtin collections (check for isinstance(x, (tuple, list))) and just stringify the rest like arbitrary objects

@untitaker

Copy link
Copy Markdown
Member

Cool, could you add an explanatory comment as well?

@leotrubach

Copy link
Copy Markdown
Contributor Author

@untitaker Do you mean comment to code or commit message?

@untitaker

Copy link
Copy Markdown
Member

in the code :) thanks!

@untitaker
untitaker merged commit 99ee2ac into getsentry:master Jan 18, 2019
@untitaker

Copy link
Copy Markdown
Member

Awesome thanks!

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.

3 participants