added logger to debug the sendotp response#199
Conversation
Signed-off-by: Nandhukumar <nandhukumare@gmail.com>
WalkthroughThe 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
`@mosip-identity-plugin/src/main/java/io/mosip/esignet/plugin/mosipid/service/HelperService.java`:
- Around line 159-160: The current info-level logs in HelperService (the
log.info lines referencing
objectMapper.writeValueAsString(idaSendOtpResponse.getResponse()) and
idaSendOtpResponse.getResponse()) expose masked contact metadata and call
objectMapper.writeValueAsString which can throw after the OTP side-effect;
change these to a guarded debug-only log (wrap with log.isDebugEnabled()) that
logs only non-sensitive derived fields (e.g., boolean flags like hasMaskedEmail,
hasMaskedMobile or String masks returned by getMaskedEmail/getMaskedMobile) and
remove the direct objectMapper.writeValueAsString call (or wrap it in try/catch
and swallow exceptions) so JSON processing errors cannot alter the method
outcome after the OTP was sent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 0c190fc4-3992-404b-8e05-db13b737fae5
📒 Files selected for processing (1)
mosip-identity-plugin/src/main/java/io/mosip/esignet/plugin/mosipid/service/HelperService.java
Summary by CodeRabbit