From e0eb39d41b05115df973d5a9676b67a9309d4ff9 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 2 Nov 2022 16:38:23 +0100 Subject: Fix bookmark import stopping at the first failure (#19669) Fixes #19389 --- app/services/import_service.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/services/import_service.rb b/app/services/import_service.rb index 676c37bde..ece5b9ef0 100644 --- a/app/services/import_service.rb +++ b/app/services/import_service.rb @@ -112,6 +112,11 @@ class ImportService < BaseService next if status.nil? && ActivityPub::TagManager.instance.local_uri?(uri) status || ActivityPub::FetchRemoteStatusService.new.call(uri) + rescue HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::UnexpectedResponseError + nil + rescue StandardError => e + Rails.logger.warn "Unexpected error when importing bookmark: #{e}" + nil end account_ids = statuses.map(&:account_id) -- cgit