Skip to content

Commit

Permalink
fix gcs wrong error message
Browse files Browse the repository at this point in the history
Signed-off-by: hillium <[email protected]>
  • Loading branch information
YuJuncen committed Feb 7, 2025
1 parent bd577a1 commit f0c5109
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions br/pkg/storage/gcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,12 +390,12 @@ func NewGCSStorage(ctx context.Context, gcs *backuppb.GCS, opts *ExternalStorage
clientOps = append(clientOps, option.WithoutAuthentication())
goto skipHandleCred
}
return nil, errors.Annotatef(berrors.ErrStorageInvalidConfig, "%v Or you should provide '--gcs.credentials_file'", err)
return nil, errors.Annotatef(berrors.ErrStorageInvalidConfig, "%v Or you should provide '--%s'", gcsCredentialsFile, err)
}
if opts.SendCredentials {
if len(creds.JSON) <= 0 {
return nil, errors.Annotate(berrors.ErrStorageInvalidConfig,
"You should provide '--gcs.credentials_file' when '--send-credentials-to-tikv' is true")
return nil, errors.Annotatef(berrors.ErrStorageInvalidConfig,
"You should provide '--%s' when '--send-credentials-to-tikv' is true", gcsCredentialsFile)
}
gcs.CredentialsBlob = string(creds.JSON)
}
Expand Down

0 comments on commit f0c5109

Please sign in to comment.