refactor: simplify error handling for access token retrieval
All checks were successful
🚀 Publish Release Package / publish (push) Successful in 21s
All checks were successful
🚀 Publish Release Package / publish (push) Successful in 21s
This commit is contained in:
@@ -48,7 +48,7 @@ func getToken(configuration *Configuration) (*Token, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if resp.StatusCode != http.StatusOK || resp.ContentLength <= 0 {
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return nil, errors.New("Failed to retrieve access token: " + resp.Status)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user