diff --git a/weed/remote_storage/gcs/gcs_storage_client.go b/weed/remote_storage/gcs/gcs_storage_client.go index 3c9d30183..b92f81b0f 100644 --- a/weed/remote_storage/gcs/gcs_storage_client.go +++ b/weed/remote_storage/gcs/gcs_storage_client.go @@ -65,12 +65,12 @@ func (s gcsRemoteStorageMaker) Make(conf *remote_pb.RemoteConf) (remote_storage. } else { data, err = os.ReadFile(googleApplicationCredentials) if err != nil { - return nil, fmt.Errorf("failed to read credentials file %s: %v", googleApplicationCredentials, err) + return nil, fmt.Errorf("failed to read credentials file %s: %w", googleApplicationCredentials, err) } } creds, err := google.CredentialsFromJSON(context.Background(), data, storage.ScopeFullControl) if err != nil { - return nil, fmt.Errorf("failed to parse credentials: %v", err) + return nil, fmt.Errorf("failed to parse credentials: %w", err) } httpClient := oauth2.NewClient(context.Background(), creds.TokenSource) clientOpts = append(clientOpts, option.WithHTTPClient(httpClient), option.WithoutAuthentication())