Skip to content

Commit

Permalink
fix(aliyundrive_open): can't refresh token if access_token is empty (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Apr 27, 2023
1 parent 9fbc543 commit b7ea73b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/aliyundrive_open/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b7ea73b

Please sign in to comment.