apache / apache/pulsar-client-go
When a connection fails, the Pulsar client should return a detailed exception instead of a generic "connection error."
- Dominant language
- Go
- Stars
- 745
- Forks
- 389
- Avg merge
- 3d 20h
- Merged PRs (30d)
- 3
Description
#### Expected behavior
When the Pulsar client connection fails, we hope to receive a more detailed and specific error message, such as:
```
WARN[0009] Failed to connect to broker. error="dial tcp [::1]:6650: connect: connection refused" remote_addr="pulsar://localhost:6650"
```
#### Actual behavior
pulsar go client return a a generic and unclear message when connection failed, like this:
```
connection error
```
#### Steps to reproduce
Connecting to an abnormal or non-started Pulsar.
#### System configuration
**Pulsar version**: master & latest release
Contributor guide
Research direction
Reproduce the failure by connecting the Go client to an abnormal or non-started Pulsar broker and compare the returned message with the reported generic "connection error." Trace the client connection failure path and verify that the completed change preserves the underlying dial error and remote address in a detailed exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100