Skip to content

Commit

Permalink
[FAB-3015]return detailed event hub connection error
Browse files Browse the repository at this point in the history
suggest we return more detailed connection error message when
connecting with event hub

Change-Id: I1335c90810c95e389507aed4a1e75031cd936d20
Signed-off-by: Frank Han <hanhzf@126.com>
  • Loading branch information
seprain committed Apr 6, 2017
1 parent a96c4f7 commit 60e3b67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions events/consumer/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func (ec *EventsClient) processEvents() error {
func (ec *EventsClient) Start() error {
conn, err := newEventsClientConnectionWithAddress(ec.peerAddress)
if err != nil {
return fmt.Errorf("Could not create client conn to %s", ec.peerAddress)
return fmt.Errorf("Could not create client conn to %s:%s", ec.peerAddress, err)
}

ies, err := ec.adapter.GetInterestedEvents()
Expand All @@ -211,7 +211,7 @@ func (ec *EventsClient) Start() error {
serverClient := ehpb.NewEventsClient(conn)
ec.stream, err = serverClient.Chat(context.Background())
if err != nil {
return fmt.Errorf("Could not create client conn to %s", ec.peerAddress)
return fmt.Errorf("Could not create client conn to %s:%s", ec.peerAddress, err)
}

if err = ec.register(ies); err != nil {
Expand Down

0 comments on commit 60e3b67

Please sign in to comment.