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

catch and convert all aio_pika connection exceptions #8712

Merged
merged 4 commits into from
May 19, 2021

Conversation

ancalita
Copy link
Member

@ancalita ancalita commented May 18, 2021

Proposed changes:

Status (please check what you already did):

  • added some tests for the functionality
  • updated the documentation
  • updated the changelog (please check changelog for instructions)
  • reformat files using black (please check Readme for instructions)

@ancalita ancalita linked an issue May 18, 2021 that may be closed by this pull request
2 tasks
@ancalita ancalita requested a review from joejuzl May 18, 2021 12:01
@@ -34,6 +34,7 @@ async def create(
sqlalchemy.exc.OperationalError,
aio_pika.exceptions.AMQPConnectionError,
aiormq.exceptions.ChannelNotFoundEntity,
*aio_pika.exceptions.CONNECTION_EXCEPTIONS,
Copy link
Contributor

Choose a reason for hiding this comment

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

Are some of the errors above included in this?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've just double-checked, the errors above are not included in aio_pika.exceptions.CONNECTION_EXCEPTIONS.

@@ -0,0 +1 @@
Catch and convert all `aio_pika` connection exceptions to subclass of `RasaException`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Only in event broker creation right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, that's where I traced the error in the Sentry stacktrace. I'll add this note to the changelog.

@wochinge
Copy link
Contributor

Can we please also ignore this one #8112 ?

@ancalita
Copy link
Member Author

@wochinge Yup, the entire built-in ConnectionError class is part of aio_pika.exceptions.CONNECTION_EXCEPTIONS and should be handled now. Nothing to action here, apart from closing 2 issues in one go after merge? 😄

@wochinge
Copy link
Contributor

Amazing 🚀

@ancalita ancalita merged commit 300b486 into 2.6.x May 19, 2021
@ancalita ancalita deleted the 8544-pika-exception branch May 19, 2021 12:08
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.

PikaEventBroker: ConnectionError: [Errno -2] Name or service not known
3 participants