Skip to content

Commit dc04254

Browse files
authored
Merge pull request #264 from wangkuiyi/disambiguate_fileput_error
Fix the ambiguous error message
2 parents 0e9b841 + eb3d1ce commit dc04254

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/putfile.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ func FormPut(cmd *cobra.Command, params []string) {
161161

162162
if err != nil {
163163
if v, ok := err.(*storage.ErrorInfo); ok {
164-
fmt.Fprintf(os.Stderr, "Put file error, %d %s, Reqid: %s\n", v.Code, v.Err, v.Reqid)
164+
fmt.Fprintf(os.Stderr, "Put file error %d: %s, Reqid: %s\n", v.Code, v.Err, v.Reqid)
165165
} else {
166166
fmt.Fprintf(os.Stderr, "Put file error: %v\n", err)
167167
}
@@ -258,7 +258,7 @@ func ResumablePut(cmd *cobra.Command, params []string) {
258258
fmt.Println()
259259
if err != nil {
260260
if v, ok := err.(*storage.ErrorInfo); ok {
261-
fmt.Fprintf(os.Stderr, "Put file error, %d %s, Reqid: %s\n", v.Code, v.Err, v.Reqid)
261+
fmt.Fprintf(os.Stderr, "Put file error %d: %s, Reqid: %s\n", v.Code, v.Err, v.Reqid)
262262
} else {
263263
fmt.Fprintf(os.Stderr, "Put file error: %v\n", err)
264264
}

0 commit comments

Comments
 (0)