Skip to content

Commit 7831226

Browse files
authored
chore: less verbose error (#2419)
## What kind of change does this PR introduce? chore ## What is the current behavior? Log more information than necessary. This simply logs a little bit less
1 parent 5b3218e commit 7831226

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/api/external_oauth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func (a *API) oAuthCallback(ctx context.Context, r *http.Request, providerType s
118118
}
119119
token, err := oauthProvider.GetOAuthToken(ctx, oauthCode, tokenOpts...)
120120
if err != nil {
121-
return nil, apierrors.NewInternalServerError("Unable to exchange external code: %s", oauthCode).WithInternalError(err)
121+
return nil, apierrors.NewInternalServerError("Unable to exchange external code: %s", oauthCode[:min(4, len(oauthCode))]).WithInternalError(err)
122122
}
123123

124124
userData, err := oauthProvider.GetUserData(ctx, token)

0 commit comments

Comments
 (0)