1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

onedrive: Don't mask HTTP error codes with JSON decode error

This commit is contained in:
Nick Craig-Wood
2015-12-28 15:10:21 +00:00
parent e69e181090
commit 05dc7183cb

View File

@@ -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