Skip to content

Commit

Permalink
Merge pull request #204 from rgolangh/fix_connection_test
Browse files Browse the repository at this point in the history
Fix error handling in case token request errors
  • Loading branch information
imjoey committed Apr 28, 2020
2 parents 4808055 + 4cc9679 commit cfaa1cf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sdk/ovirtsdk/connection.go
Expand Up @@ -94,6 +94,9 @@ func (c *Connection) testToken() (int, error) {
return 0, err
}
res, err := c.client.Do(options)
if err != nil {
return 0, err
}
defer res.Body.Close()

return res.StatusCode, err
Expand Down

0 comments on commit cfaa1cf

Please sign in to comment.