Skip to content

Commit e632978

Browse files
committed
Don't log nil error when AuthInfo is not set
1 parent 56c5714 commit e632978

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/cloud/services/compute/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func NewService(client *gophercloud.ProviderClient, clientOpts *clientconfig.Cli
7070
}
7171

7272
if clientOpts.AuthInfo == nil {
73-
return nil, fmt.Errorf("failed to get project id: authInfo must be set: %v", err)
73+
return nil, fmt.Errorf("failed to get project id: authInfo must be set")
7474
}
7575

7676
projectID := clientOpts.AuthInfo.ProjectID

pkg/cloud/services/networking/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func NewService(client *gophercloud.ProviderClient, clientOpts *clientconfig.Cli
4949
}
5050

5151
if clientOpts.AuthInfo == nil {
52-
return nil, fmt.Errorf("failed to get project id: authInfo must be set: %v", err)
52+
return nil, fmt.Errorf("failed to get project id: authInfo must be set")
5353
}
5454

5555
projectID := clientOpts.AuthInfo.ProjectID

0 commit comments

Comments
 (0)