diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-18 23:19:38 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-18 23:19:38 +0100 |
commit | 2c58e7e06a5c5e5309255c4cc70605caff8fcb87 (patch) | |
tree | 47878fa32a18523c1d1e86edc078468ec25b7e09 | |
parent | e4f56fa94217061b25f3a8f45d17c8657ca9c56d (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.rb | 3 |
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 |