Skip to content

Conversation

@samikshya-db
Copy link
Collaborator

Description

  • Earlier the error telemetry logs only contained
    • error_name: "AUTH_ERROR" stack_trace: "Failed to retrieve the exchanged token".
  • With this change, it would be more descriptive - i.e., contain http error code and reason.
    • Failed to retrieve the exchanged token from OIDC token endpoint. HTTP request failed by code: 401, status line: HTTP/1.1 401 Unauthorized. Error message: Invalid credentials.

Testing

Additional Notes to the Reviewer

@samikshya-db samikshya-db requested a review from gopalldb January 13, 2026 15:10
return retrieveToken(hc, tokenUrl, params, headers);
}

private static final String TOKEN_EXCHANGE_ERROR_MESSAGE =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final string for errors is unconventional in our code. We can keep this defined once in the business logic of function, and reuse the same string again in catch block. But usually it is better to keep different error messages for errors at different places. Debugging will be easier, as from errormsg we can uniquely identify code where error occurred. So, no real incentive for reuse here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants