[rabbitmq-discuss] how to detect bad username/password in 0.9.5?
Gavin M. Roy
gmr at myyearbook.com
Mon May 9 17:26:55 BST 2011
Based on the follow-up emails, I'll have an Exception raised when the connection closes after start-ok in 0.9.6.
Gavin
On Thursday, May 5, 2011 at 11:17 AM, Brandon Craig Rhodes wrote:
When a error occurs while connecting in Pika 0.9.5, I have to go log on
> to my RabbitMQ server and look at its logs to discover what happened -
> the IOLoop in the local program simply returns after three seconds and
> my next piece of code breaks because the `on_open_callback` callback
> that I am passing to my `SelectConnection` never gets called when the
> username and password are wrong.
>
> How am I supposed to intercept this condition so that I can return an
> error message to my user? I tried registering a callback with the
> `connection.add_on_close_callback()` method but, sensibly enough, it
> never gets called because this is not really a connection-close, but a
> connection not getting established in the first place. I have looked
> around for some sort of a `connection.add_on_error_callback()` or some
> similar sort of facility, but cannot find one.
>
> How do I catch and handle asynchronous errors?
>
> Thanks for ANY help that you guys can offer - and thanks, Gavin, for
> writing such an important part of the modern Python ecosystem!
>
> --
> Brandon Craig Rhodes brandon at rhodesmill.org http://rhodesmill.org/brandon
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110509/f765b0bb/attachment.htm>
More information about the rabbitmq-discuss
mailing list