From e94a63e22107c17c4d2f8c60a08d707b3836ebf4 Mon Sep 17 00:00:00 2001 From: walkinggo <40360529+walkinggo@users.noreply.github.com> Date: Wed, 11 Dec 2024 16:28:37 +0800 Subject: [PATCH] include additional context in the error message. --- pulsar/internal/connection.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pulsar/internal/connection.go b/pulsar/internal/connection.go index 04a3cc83f9..8e81e9677c 100644 --- a/pulsar/internal/connection.go +++ b/pulsar/internal/connection.go @@ -356,7 +356,8 @@ func (c *connection) waitUntilReady() error { return nil case <-c.closeCh: // Connection has been closed while waiting for the readiness. - return errors.New("connection error") + errMsg := fmt.Sprintf(`WARN[0009] Failed to connect to broker. error="dial tcp [::1]:6650: connect: connection refused" remote_addr="%s"`, c.physicalAddr.String()) + return errors.New(errMsg) } }