fix: accept 201 Created from /oauth/locationToken endpoint
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:
Head of Product & Engineering 2026-04-06 11:38:53 +02:00
parent 5be170cf16
commit b01b0f703c

View File

@ -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))
}