mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 16:34:30 +01:00
onedrive: Don't mask HTTP error codes with JSON decode error
This commit is contained in:
parent
e69e181090
commit
05dc7183cb
@ -158,7 +158,7 @@ func errorHandler(resp *http.Response) error {
|
||||
errResponse := new(api.Error)
|
||||
err := rest.DecodeJSON(resp, &errResponse)
|
||||
if err != nil {
|
||||
return err
|
||||
fs.Debug(nil, "Couldn't decode error response: %v", err)
|
||||
}
|
||||
if errResponse.ErrorInfo.Code == "" {
|
||||
errResponse.ErrorInfo.Code = resp.Status
|
||||
|
Loading…
Reference in New Issue
Block a user