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

s3-about
Nick Craig-Wood 2015-12-28 15:10:21 +00:00
parent e69e181090
commit 05dc7183cb
1 changed files with 1 additions and 1 deletions

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