about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-18 23:19:38 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-18 23:19:38 +0100
commit2c58e7e06a5c5e5309255c4cc70605caff8fcb87 (patch)
tree47878fa32a18523c1d1e86edc078468ec25b7e09
parente4f56fa94217061b25f3a8f45d17c8657ca9c56d (diff)
Catch validation errors in ProcessFeedService so that one failing entry wouldn't stop others from going through
-rw-r--r--app/services/process_feed_service.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb
index 08c66c904..8daea1675 100644
--- a/app/services/process_feed_service.rb
+++ b/app/services/process_feed_service.rb
@@ -36,6 +36,9 @@ class ProcessFeedService < BaseService
       when :delete
         return delete_status
       end
+    rescue ActiveRecord::RecordInvalid => e
+      Rails.logger.debug "Nothing was saved for #{id} because: #{e}"
+      nil
     end
 
     private