Skip to content

Commit 540a487

Browse files
committed
Fix spellcheck: unparseable → unparsable
Signed-off-by: Greg Katz <gkatz@indeed.com>
1 parent 161a70d commit 540a487

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

pkg/auth/monitored_token_source.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ func (mts *MonitoredTokenSource) onTick() (bool, time.Duration) {
325325
}
326326

327327
// isTransientNetworkError reports whether err represents a transient condition
328-
// (DNS failure, TCP transport error, timeout, OAuth server 5xx, unparseable
328+
// (DNS failure, TCP transport error, timeout, OAuth server 5xx, unparsable
329329
// token response) that is likely to resolve on its own.
330330
//
331331
// OAuth2 client-level auth failures (invalid_grant, 401, 400) and TLS errors
@@ -382,7 +382,7 @@ func isTransientNetworkError(err error) bool {
382382
}
383383

384384
// isOAuthParseError detects errors from the oauth2 library that indicate the
385-
// token endpoint returned an unparseable response body on a 2xx status. This
385+
// token endpoint returned an unparsable response body on a 2xx status. This
386386
// typically happens when a load balancer, CDN, or reverse proxy intercepts the
387387
// request and returns its own HTML page instead of the expected JSON token
388388
// response. The oauth2 library uses fmt.Errorf with %v (not %w) for these

pkg/auth/monitored_token_source_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ func TestMonitoredTokenSource_BackgroundMonitor_ErrorClassification(t *testing.T
573573
{name: "oauth2.RetrieveError 502", err: createRetrieveError(http.StatusBadGateway, "Bad Gateway"), isTransient: true},
574574
{name: "oauth2.RetrieveError 503", err: createRetrieveError(http.StatusServiceUnavailable, "Service Unavailable"), isTransient: true},
575575
{name: "oauth2.RetrieveError 504", err: createRetrieveError(http.StatusGatewayTimeout, "Gateway Timeout"), isTransient: true},
576-
// Transient: unparseable OAuth responses (HTML from load balancer on 200).
576+
// Transient: unparsable OAuth responses (HTML from load balancer on 200).
577577
{name: "oauth2 cannot parse json", err: fmt.Errorf("oauth2: cannot parse json: invalid character '<'"), isTransient: true},
578578
{name: "wrapped oauth2 parse error", err: fmt.Errorf("refresh failed: %w", fmt.Errorf("oauth2: cannot parse json: invalid character '<'")), isTransient: true},
579579
{name: "oauth2 cannot parse response", err: fmt.Errorf("oauth2: cannot parse response: invalid URL escape"), isTransient: true},

0 commit comments

Comments
 (0)