forked from TrueCloudLab/rclone
onedrive: Don't mask HTTP error codes with JSON decode error
This commit is contained in:
parent
e69e181090
commit
05dc7183cb
1 changed files with 1 additions and 1 deletions
|
@ -158,7 +158,7 @@ func errorHandler(resp *http.Response) error {
|
||||||
errResponse := new(api.Error)
|
errResponse := new(api.Error)
|
||||||
err := rest.DecodeJSON(resp, &errResponse)
|
err := rest.DecodeJSON(resp, &errResponse)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
fs.Debug(nil, "Couldn't decode error response: %v", err)
|
||||||
}
|
}
|
||||||
if errResponse.ErrorInfo.Code == "" {
|
if errResponse.ErrorInfo.Code == "" {
|
||||||
errResponse.ErrorInfo.Code = resp.Status
|
errResponse.ErrorInfo.Code = resp.Status
|
||||||
|
|
Loading…
Add table
Reference in a new issue