catch connection error for rabbitmq