chore: clear error message with unauthorized credentials (#5236)
This commit is contained in:
+1
-1
@@ -336,7 +336,7 @@ func prepareCopyURLs(ctx context.Context, o prepareCopyURLsOpts) chan URLs {
|
||||
defer close(copyURLsCh)
|
||||
copyURLsContent, err := guessCopyURLType(ctx, o)
|
||||
if err != nil {
|
||||
copyURLsCh <- URLs{Error: errUnableToGuess().Trace(o.sourceURLs...)}
|
||||
copyURLsCh <- URLs{Error: errUnableToGuess(err.Cause.Error()).Trace(o.sourceURLs...)}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
+4
-1
@@ -41,8 +41,11 @@ var errInvalidArgument = func() *probe.Error {
|
||||
|
||||
type unableToGuessErr error
|
||||
|
||||
var errUnableToGuess = func() *probe.Error {
|
||||
var errUnableToGuess = func(customMsg string) *probe.Error {
|
||||
msg := "Unable to guess the type of copy operation."
|
||||
if strings.TrimSpace(customMsg) != "" {
|
||||
msg = customMsg
|
||||
}
|
||||
return probe.NewError(unableToGuessErr(errors.New(msg)))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user