Fix silient token reponse error
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -158,6 +158,10 @@ func (c *OAuth2Connector) Complete(ctx context.Context, connectorID string, orga
|
||||
}
|
||||
defer tokenResp.Body.Close()
|
||||
|
||||
if tokenResp.StatusCode != http.StatusOK {
|
||||
return nil, fmt.Errorf("token response status: %d", tokenResp.StatusCode)
|
||||
}
|
||||
|
||||
type tokenResponse struct {
|
||||
AccessToken string `json:"access_token"`
|
||||
RefreshToken string `json:"refresh_token"`
|
||||
|
||||
Reference in New Issue
Block a user