Mute ActiveRecord::RecordInvalid due to ignores

closes #5943
This commit is contained in:
Dennis Schubert 2015-05-10 02:32:30 +02:00 committed by Jonne Haß
parent 32f95a860c
commit 1a4e3cef48
2 changed files with 5 additions and 2 deletions

View file

@ -6,7 +6,7 @@
* Dropped db/seeds.rb [#5896](https://github.com/diaspora/diaspora/pull/5896)
* Drop broken install scripts [#5907](https://github.com/diaspora/diaspora/pull/5907)
* Improve invoking mobile site in the testsuite [#5915](https://github.com/diaspora/diaspora/pull/5915)
* Do not retry a couple of unrecoverable job failures [#5938](https://github.com/diaspora/diaspora/pull/5938)
* Do not retry a couple of unrecoverable job failures [#5938](https://github.com/diaspora/diaspora/pull/5938) [#5942](https://github.com/diaspora/diaspora/pull/5943)
## Bug fixes
* Disable auto follow back on aspect deletion [#5846](https://github.com/diaspora/diaspora/pull/5846)

View file

@ -21,7 +21,10 @@ module Workers
Rails.logger.info("error on receive: #{e.class}")
rescue ActiveRecord::RecordInvalid => e
Rails.logger.info("failed to save received object: #{e.record.errors.full_messages}")
raise e unless e.message.match(/already been taken/)
raise e unless %w(
"already been taken"
"is ignored by the post author"
).any? {|reason| e.message.include? reason }
rescue ActiveRecord::RecordNotUnique => e
Rails.logger.info("failed to save received object: #{e.message}")
raise e unless %w(