Skip to content

Bottle redirect fix#317

Merged
untitaker merged 4 commits into
getsentry:masterfrom
shenek:bottle-redirect-fix
Apr 3, 2019
Merged

Bottle redirect fix#317
untitaker merged 4 commits into
getsentry:masterfrom
shenek:bottle-redirect-fix

Conversation

@shenek

@shenek shenek commented Apr 3, 2019

Copy link
Copy Markdown
Contributor

I found out that a sentry record is created when a Bottle redirect is performed.

This MR should fix that.

I also included a small tox.ini update.

Comment thread sentry_sdk/integrations/bottle.py Outdated
res = prepared_callback(*args, **kwargs)
except Exception as exception:
def capture_exception(exception):
hub = Hub.current

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot this when reviewing your first PR, but you can use the hub variable from outer scope.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. Thanks for noticing.

Comment thread sentry_sdk/integrations/bottle.py Outdated
try:
res = prepared_callback(*args, **kwargs)
except HTTPResponse as exception:
if exception.status == 500:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are those exceptions even interesting?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems not. I'll skip all. Thanks.

@untitaker
untitaker merged commit d36a591 into getsentry:master Apr 3, 2019
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.

2 participants