mirror of
https://github.com/rclone/rclone.git
synced 2024-11-25 09:41:44 +08:00
onedrive: fix spurious "Couldn't decode error response: EOF" DEBUG
Some checks failed
Docker beta build / Build image job (push) Has been cancelled
Some checks failed
Docker beta build / Build image job (push) Has been cancelled
This DEBUG was being generated on redirects which don't have a JSON body and is irrelevant.
This commit is contained in:
parent
15a026d3be
commit
1bc9b94cf2
|
@ -942,7 +942,8 @@ func errorHandler(resp *http.Response) error {
|
||||||
// Decode error response
|
// Decode error response
|
||||||
errResponse := new(api.Error)
|
errResponse := new(api.Error)
|
||||||
err := rest.DecodeJSON(resp, &errResponse)
|
err := rest.DecodeJSON(resp, &errResponse)
|
||||||
if err != nil {
|
// Redirects have no body so don't report an error
|
||||||
|
if err != nil && resp.Header.Get("Location") == "" {
|
||||||
fs.Debugf(nil, "Couldn't decode error response: %v", err)
|
fs.Debugf(nil, "Couldn't decode error response: %v", err)
|
||||||
}
|
}
|
||||||
if errResponse.ErrorInfo.Code == "" {
|
if errResponse.ErrorInfo.Code == "" {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user