diff --git a/modules/va_notify/lib/va_notify/service.rb b/modules/va_notify/lib/va_notify/service.rb index 716e5a36dcb..81f35431373 100644 --- a/modules/va_notify/lib/va_notify/service.rb +++ b/modules/va_notify/lib/va_notify/service.rb @@ -88,7 +88,8 @@ def create_notification(response) raise Common::Exceptions::BackendServiceException, notification if response.nil? notification = VANotify::Notification.new( - notification_id: response['id'] + notification_id: response['id'], + source_location: find_caller_locations ) if notification.save @@ -103,5 +104,11 @@ def create_notification(response) raise Common::Exceptions::ValidationErrors, notification end end + + def find_caller_locations + caller_locations(1,1).map do |location| + "#{location.path}:#{location.lineno} in #{location.label}" + end + end end end