Done
Pinned fields
Click on the next to a field label to start pinning.
Details
Details
Assignee
Łukasz Lewczyński
Łukasz Lewczyński(Deactivated)Reporter
Sebastian Brudziński
Sebastian BrudzińskiStory Points
3
Original estimate
2d
Time tracking
1d 1h 30m logged6h 30m remaining
Components
Sprint
None
Fix versions
Affects versions
Priority
Time Assistant
Time Assistant
Created October 13, 2017 at 10:52 AM
Updated November 13, 2017 at 6:54 PM
Resolved October 31, 2017 at 7:29 AM
Attempting to send an e-mail to a user that does not have an e-mail address set currently results in an exception both in the notification service and then consequently in the service that was trying to use the notification service. This should be handled more gracefully and translated into our own validation (should we even throw an exception in such case?)
Current stacktrace from notification service:
10:59:33.383 malawi-production /var/log/messages 2017-10-13T08:59:32+00:00 6472e5189e0a [nio-8080-exec-3] ERROR org.openlmis.notification.web.NotificationController Unable to send notification 10:59:33.383 malawi-production /var/log/messages 2017-10-13T08:59:32+00:00 6472e5189e0a #011java.lang.IllegalArgumentException: To address must not be null 10:59:33.384 malawi-production /var/log/messages 2017-10-13T08:59:32+00:00 6472e5189e0a #011at org.springframework.util.Assert.notNull(Assert.java:115) 10:59:33.384 malawi-production /var/log/messages 2017-10-13T08:59:32+00:00 6472e5189e0a #011at org.springframework.mail.javamail.MimeMessageHelper.setTo(MimeMessageHelper.java:585) 10:59:33.384 malawi-production /var/log/messages 2017-10-13T08:59:32+00:00 6472e5189e0a #011at org.openlmis.notification.service.NotificationService.sendNotification(NotificationService.java:50) 10:59:33.384 malawi-production /var/log/messages 2017-10-13T08:59:32+00:00 6472e5189e0a #011at org.openlmis.notification.web.NotificationController.sendNotification(NotificationController.java:51)
Requisition service trying to use Notification service:
09:20:21.755 malawi-production /var/log/messages 2017-10-13T07:20:20+00:00 efaa66a2f3b9 [o-8080-exec-211] ERROR org.openlmis.requisition.service.NotificationService Can not send notification 09:20:21.755 malawi-production /var/log/messages 2017-10-13T07:20:20+00:00 efaa66a2f3b9 #011org.springframework.web.client.HttpServerErrorException: 500 null 09:20:21.755 malawi-production /var/log/messages 2017-10-13T07:20:20+00:00 efaa66a2f3b9 #011at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:94) 09:20:21.755 malawi-production /var/log/messages 2017-10-13T07:20:20+00:00 efaa66a2f3b9 #011at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:667) 09:20:21.755 malawi-production /var/log/messages 2017-10-13T07:20:20+00:00 efaa66a2f3b9 #011at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:620) 09:20:21.755 malawi-production /var/log/messages 2017-10-13T07:20:20+00:00 efaa66a2f3b9 #011at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:595) 09:20:21.755 malawi-production /var/log/messages 2017-10-13T07:20:20+00:00 efaa66a2f3b9 #011at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:398) 09:20:21.755 malawi-production /var/log/messages 2017-10-13T07:20:20+00:00 efaa66a2f3b9 #011at org.openlmis.requisition.service.NotificationService.notify(NotificationService.java:61) 09:20:21.755 malawi-production /var/log/messages 2017-10-13T07:20:20+00:00 efaa66a2f3b9 #011at org.openlmis.requisition.service.ConvertToOrderNotifier.notifyConvertToOrder(ConvertToOrderNotifier.java:87) 09:20:21.755 malawi-production /var/log/messages 2017-10-13T07:20:20+00:00 efaa66a2f3b9 #011at org.openlmis.requisition.service.DefaultRequisitionStatusProcessor.statusChange(DefaultRequisitionStatusProcessor.java:46) 09:20:21.755 malawi-production /var/log/messages 2017-10-13T07:20:20+00:00 efaa66a2f3b9 #011at org.openlmis.requisition.service.RequisitionService.convertToOrder(RequisitionService.java:609)