wuYin commented on a change in pull request #450:
URL: https://github.com/apache/pulsar-client-go/pull/450#discussion_r563908077



##########
File path: pulsar/internal/lookup_service.go
##########
@@ -140,12 +140,9 @@ func (ls *lookupService) Lookup(topic string) 
(*LookupResult, error) {
                        }, nil
 
                case pb.CommandLookupTopicResponse_Failed:
-                       errorMsg := ""
-                       if lr.Error != nil {
-                               errorMsg = lr.Error.String()
-                       }
-                       ls.log.Warnf("Failed to lookup topic: %s, error msg: 
%s", topic, errorMsg)
-                       return nil, fmt.Errorf("failed to lookup topic: %s", 
errorMsg)
+                       err := fmt.Errorf("failed to lookup topic: %s, error: 
%s, message: %s", topic, lr.GetError(), lr.GetMessage())

Review comment:
       Thanks for review, I'll follow this convention
   Now I removed string formatting, message fields will be highlight in log and 
only print once




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to