ES-2909 | added logger for debugging#1783
Conversation
Signed-off-by: Nandhukumar <nandhukumare@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe SMS notification controller now includes structured error handling and logging: a static SLF4J logger was added and the SMS send call is wrapped in a try-catch that logs exceptions and rethrows them. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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
`@kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/controller/SmsNotificationController.java`:
- Around line 64-69: The controller currently swallows errors when calling
smsNotifierService.sendSmsNotification in SmsNotificationController by catching
Throwable and only logging, which returns a 200 with an empty responseWrapper;
change this so exceptions propagate to EmailNotificationApiExceptionHandler:
either remove the try/catch completely or replace it with a catch(Exception e)
that logs via LOGGER.error(...) and then rethrows the same exception (throw e)
so the global handler can produce the proper 500 response; ensure
responseWrapper.setResponse(...) is only executed on successful send and do not
suppress the original exception.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e8dec843-8247-4cd5-8c60-224c8ea2a41a
📒 Files selected for processing (1)
kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/controller/SmsNotificationController.java
Signed-off-by: Nandhukumar <nandhukumare@gmail.com>
Summary by CodeRabbit