fix(aliyundrive_open): can't refresh token if access_token is empty (#4255)

pull/4263/head
Noah Hsu 2023-04-27 23:59:12 +08:00
parent 9fbc54314d
commit b7ea73b3c2
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ func (d *AliyundriveOpen) request(uri, method string, callback base.ReqCallback,
}
isRetry := len(retry) > 0 && retry[0]
if e.Code != "" {
if !isRetry && e.Code == "AccessTokenInvalid" {
if !isRetry && (utils.SliceContains([]string{"AccessTokenInvalid", "AccessTokenExpired", "I400JD"}, e.Code) || d.AccessToken == "") {
err = d.refreshToken()
if err != nil {
return nil, err