fix: wrap the error of group user and thrid (#2005)

* fix: wrap the error of group user and thrid

* fix: del the chinese comment

* fix: fix the make_lint error

* fix: fix the ApiTest error
This commit is contained in:
Brabem
2024-03-06 16:20:07 +08:00
committed by GitHub
parent c7dad1a5c1
commit 52b8efba73
13 changed files with 49 additions and 50 deletions
@@ -100,7 +100,7 @@ func (cd *ConnDirect) GetConns(ctx context.Context,
for _, port := range ports {
conn, err := cd.dialServiceWithoutResolver(ctx, fmt.Sprintf(cd.config.Rpc.ListenIP+":%d", port), append(cd.additionalOpts, opts...)...)
if err != nil {
fmt.Printf("connect to port %d failed,serviceName %s, IP %s\n", port, serviceName, cd.config.Rpc.ListenIP)
return nil, errs.Wrap(fmt.Errorf("connect to port %d failed,serviceName %s, IP %s", port, serviceName, cd.config.Rpc.ListenIP))
}
connections = append(connections, conn)
}
@@ -166,7 +166,7 @@ func (cd *ConnDirect) dialServiceWithoutResolver(ctx context.Context, address st
conn, err := grpc.DialContext(ctx, address, options...)
if err != nil {
return nil, err
return nil, errs.Wrap(err)
}
return conn, nil
}