Skip to content

Conversation

@bhagyasakalanka
Copy link
Contributor

Proposed changes in this pull request

note $subject

Comment on lines 218 to +221
String resourceResidentOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getOrganizationId();
if (!jwtIssuerOrgId.equals(switchedOrgOrgAncestors.get(depthOfRootOrg)) ||
!resourceResidentOrgId.equals(switchedOrgId)) {
throw new IdentityOAuth2Exception("No registered IDP found for the token with issuer name : "
throw new IdentityOAuth2ClientException("No registered IDP found for the token with issuer name : "
Copy link
Contributor

Choose a reason for hiding this comment

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

Log Improvement Suggestion No: 1

Suggested change
String resourceResidentOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getOrganizationId();
if (!jwtIssuerOrgId.equals(switchedOrgOrgAncestors.get(depthOfRootOrg)) ||
!resourceResidentOrgId.equals(switchedOrgId)) {
throw new IdentityOAuth2Exception("No registered IDP found for the token with issuer name : "
throw new IdentityOAuth2ClientException("No registered IDP found for the token with issuer name : "
String resourceResidentOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getOrganizationId();
if (!jwtIssuerOrgId.equals(switchedOrgOrgAncestors.get(depthOfRootOrg)) ||
!resourceResidentOrgId.equals(switchedOrgId)) {
log.error("No registered IDP found for JWT issuer: " + jwtIssuer + ", jwtIssuerOrgId: " + jwtIssuerOrgId + ", resourceResidentOrgId: " + resourceResidentOrgId);

Copy link
Contributor

@wso2-engineering wso2-engineering bot left a comment

Choose a reason for hiding this comment

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

AI Agent Log Improvement Checklist

⚠️ Warning: AI-Generated Review Comments

  • The log-related comments and suggestions in this review were generated by an AI tool to assist with identifying potential improvements. Purpose of reviewing the code for log improvements is to improve the troubleshooting capabilities of our products.
  • Please make sure to manually review and validate all suggestions before applying any changes. Not every code suggestion would make sense or add value to our purpose. Therefore, you have the freedom to decide which of the suggestions are helpful.

✅ Before merging this pull request:

  • Review all AI-generated comments for accuracy and relevance.
  • Complete and verify the table below. We need your feedback to measure the accuracy of these suggestions and the value they add. If you are rejecting a certain code suggestion, please mention the reason briefly in the suggestion for us to capture it.
Comment Accepted (Y/N) Reason
#### Log Improvement Suggestion No: 1

@codecov
Copy link

codecov bot commented Nov 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.98%. Comparing base (b096131) to head (f81cd1f).
⚠️ Report is 18 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2984      +/-   ##
============================================
- Coverage     56.88%   55.98%   -0.91%     
- Complexity     9608     9884     +276     
============================================
  Files           669      669              
  Lines         54806    57392    +2586     
  Branches      12545    13438     +893     
============================================
+ Hits          31179    32133     +954     
- Misses        19239    20658    +1419     
- Partials       4388     4601     +213     
Flag Coverage Δ
unit 41.14% <100.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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