From 039fa894814fd95923e44988a4e6fb7c820390d6 Mon Sep 17 00:00:00 2001 From: yyefimov Date: Thu, 2 Oct 2025 22:08:15 -0400 Subject: [PATCH] fix(coderd): correct the name of the unmarshall error variable (#20150) Incorrect error variable is used during reporting of the issue during unmarshall operations and this makes it hard to understand the underlying reason for OIDC failure: use `unmarshalError` instead of `err`. --- coderd/oauthpki/oidcpki.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coderd/oauthpki/oidcpki.go b/coderd/oauthpki/oidcpki.go index d761c43e44..fa1c3854af 100644 --- a/coderd/oauthpki/oidcpki.go +++ b/coderd/oauthpki/oidcpki.go @@ -247,7 +247,7 @@ func (src *jwtTokenSource) Token() (*oauth2.Token, error) { } if unmarshalError != nil { - return nil, xerrors.Errorf("oauth2: cannot unmarshal token: %w", err) + return nil, xerrors.Errorf("oauth2: cannot unmarshal token: %w", unmarshalError) } newToken := &oauth2.Token{