diff --git a/app/jobs/activity_pub/fetch_job.rb b/app/jobs/activity_pub/fetch_job.rb index 526cdafb..097a8d32 100644 --- a/app/jobs/activity_pub/fetch_job.rb +++ b/app/jobs/activity_pub/fetch_job.rb @@ -12,7 +12,11 @@ class ActivityPub::FetchJob < ApplicationJob ActivityPub::Object.transaction do response = site.social_inbox.dereferencer.get(uri: object.uri) - object.update(content: FastJsonparser.parse(response.body)) if response.ok? + # @todo Fallar cuando la respuesta no funcione? + return unless response.ok? + return unless response.miss? + + object.update(content: FastJsonparser.parse(response.body)) end end end