[ES-2838] changed exception code to give correct error response#1651
[ES-2838] changed exception code to give correct error response#1651KashiwalHarsh wants to merge 2 commits intomosip:developfrom
Conversation
Signed-off-by: Harsh Kashiwal <harsh.kashiwal@infosys.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Repository UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
WalkthroughError code used when a request's Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@oidc-service-impl/src/main/java/io/mosip/esignet/services/OAuthServiceImpl.java`:
- Around line 233-234: The code throws ErrorConstants.INVALID_CLIENT in
OAuthServiceImpl when tokenRequest.getClient_id() mismatches
transaction.getClientId(), but tests (OAuthServiceTest) and the OpenAPI spec
expect INVALID_CLIENT_ID; change the thrown constant to
ErrorConstants.INVALID_CLIENT_ID (or if the project standard is INVALID_CLIENT,
update OAuthServiceTest assertions to expect ErrorConstants.INVALID_CLIENT) so
the token endpoint error code is consistent; update all related token endpoint
tests (e.g., the assertion at OAuthServiceTest line ~421) to match the chosen
constant and ensure alignment with the OAuth spec/OpenAPI.
oidc-service-impl/src/main/java/io/mosip/esignet/services/OAuthServiceImpl.java
Show resolved
Hide resolved
Signed-off-by: Harsh Kashiwal <harsh.kashiwal@infosys.com>
Summary by CodeRabbit