fix: accept 201 Created from /oauth/locationToken endpoint
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
GHL returns 201 (not 200) on successful location token exchange. Accept both 200 and 201 as success responses. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
5be170cf16
commit
b01b0f703c
@ -344,7 +344,7 @@ func (h *OAuthHandler) exchangeForLocationToken(ctx context.Context, companyAcce
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusCreated {
|
||||
return nil, fmt.Errorf("locationToken endpoint returned %d: %s", resp.StatusCode, string(body))
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user