fix(aliyundrive): return error if got wrong http code (#2543)
This commit is contained in:
parent
18a63e34dd
commit
9c1ffdbb82
@ -62,6 +62,8 @@ func (d *AliDrive) request(url, method string, callback base.ReqCallback, resp i
|
||||
return d.request(url, method, callback, resp)
|
||||
}
|
||||
return nil, errors.New(e.Message), e
|
||||
} else if res.IsError() {
|
||||
return nil, errors.New("bad status code " + res.Status()), e
|
||||
}
|
||||
return res.Body(), nil, e
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user