-
Notifications
You must be signed in to change notification settings - Fork 63
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
Trying to publish on a closed channel results in broad exception type RuntimeError
#63
Comments
Also thought about it. Perhaps existing |
Fixed in #65. and |
Thank you for this issue and sorry for the delayed reply. I hope I released what are you wanted :-) Please close this issue if this enough. |
I remember about need of backward compatibility, but if inherit new exception from |
I like @decaz's idea of having a single exception to catch, but right now having Thank you :) Now the only thing that is needed is a release of |
Hi,
we are working on an application that, through
aio-pika
, usesaiormq
. While dealing with some issues caused by unreliable network conditions, we noticed that trying to publish on a channel that has been closed results in a rather broadRuntimeError
, raised here:aiormq/aiormq/channel.py
Line 77 in 5e735e0
Below is a typical stack trace for when this happens, starting at a call to
aio_pika.Exchange.publish()
:We are afraid that, when writing error handling code for this condition, catching
RuntimeError
might accidentally catch other errors, too.Would it be possible to raise a more descriptive exception, of distinct type? The exception type might subclass
RuntimeError
as to not break code that catches that.The text was updated successfully, but these errors were encountered: