mirror of
https://github.com/rclone/rclone.git
synced 2024-11-07 17:14:44 +01:00
box: fix unhelpful decoding of error messages into decimal numbers
Before this change the box backend could make errors like Error "not_found" (404): On-Behalf-Of User not found ([123 34 105 110 118 97 108 105 100 95 117 115 101 114 95 105 100 34 58 123 34 105 100 34 58 34 48 48 48 48 48 48 48 48 48 48 48 34 125 125]) This fixes it to produce this instead Error "not_found" (404): On-Behalf-Of User not found ({"invalid_user_id":{"id":"00000000000"}})
This commit is contained in:
parent
11eeaaf792
commit
d12a92eac9
@ -52,7 +52,7 @@ func (e *Error) Error() string {
|
|||||||
out += ": " + e.Message
|
out += ": " + e.Message
|
||||||
}
|
}
|
||||||
if e.ContextInfo != nil {
|
if e.ContextInfo != nil {
|
||||||
out += fmt.Sprintf(" (%+v)", e.ContextInfo)
|
out += fmt.Sprintf(" (%s)", string(e.ContextInfo))
|
||||||
}
|
}
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user