8000 Bottle redirect fix by shenek · Pull Request #317 · getsentry/sentry-python · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@shenek
Copy link
Contributor
@shenek shenek commented Apr 3, 2019

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.

res = prepared_callback(*args, **kwargs)
except Exception as exception:
def capture_exception(exception):
hub = Hub.current
Copy link
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
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.

try:
res = prepared_callback(*args, **kwargs)
except HTTPResponse as exception:
if exception.status == 500:
Copy link
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
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

0