Skip to content

Commit 5c9ec4b

Browse files
committed
connection: remove unwanted error
if the connection is not present in the pool, the error is always nil, skip adding nil error to the returned error. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
1 parent 1fd4356 commit 5c9ec4b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/connection/connection_pool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ func (cp *ConnectionPool) GetLeaderByDriver(ctx context.Context, reconciler clie
176176

177177
conn, ok := cp.pool[key]
178178
if !ok {
179-
return nil, fmt.Errorf("no connection with key %q found for driver %q: %w", key, driverName, err)
179+
return nil, fmt.Errorf("no connection with key %q found for driver %q", key, driverName)
180180
}
181181

182182
if err = conn.Connect(); err != nil {

0 commit comments

Comments
 (0)