fix(qq): clear linter blockers in token source
This commit is contained in:
parent
bf2d9a86df
commit
9fdc1ad6dc
1 changed files with 7 additions and 3 deletions
|
|
@ -97,12 +97,16 @@ func (s *qqTokenSource) getNewToken() (*oauth2.Token, error) {
|
|||
}
|
||||
|
||||
if rsp.StatusCode != http.StatusOK {
|
||||
return nil, fmt.Errorf("qq token request failed: status=%d body=%s", rsp.StatusCode, strings.TrimSpace(string(body)))
|
||||
return nil, fmt.Errorf(
|
||||
"qq token request failed: status=%d body=%s",
|
||||
rsp.StatusCode,
|
||||
strings.TrimSpace(string(body)),
|
||||
)
|
||||
}
|
||||
|
||||
parsed := &qqTokenResponse{}
|
||||
if err := json.Unmarshal(body, parsed); err != nil {
|
||||
return nil, fmt.Errorf("qq token response decode failed: %w", err)
|
||||
if decodeErr := json.Unmarshal(body, parsed); decodeErr != nil {
|
||||
return nil, fmt.Errorf("qq token response decode failed: %w", decodeErr)
|
||||
}
|
||||
|
||||
if parsed.Code != 0 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue