Gracefully handle BulkIndexFailure in app.rb

Except in dev, bulk indexing is only done in the background, but this is here
for completeness.