]> cat aescling's git repositories - mastodon.git/commitdiff
Change ActivityPub::DeliveryWorker to not retry HTTP 501 errors (#11233)
authorEugen Rochko <eugen@zeonfederated.com>
Mon, 1 Jul 2019 22:59:53 +0000 (00:59 +0200)
committerGitHub <noreply@github.com>
Mon, 1 Jul 2019 22:59:53 +0000 (00:59 +0200)
app/workers/activitypub/delivery_worker.rb

index 79f1e8153614491bc8837958cbc69ee90393fe7e..818fd8f5d9653b9b663a73f54684e62df5c5cd11 100644 (file)
@@ -54,7 +54,7 @@ class ActivityPub::DeliveryWorker
   end
 
   def response_error_unsalvageable?(response)
-    (400...500).cover?(response.code) && ![401, 408, 429].include?(response.code)
+    response.code == 501 || ((400...500).cover?(response.code) && ![401, 408, 429].include?(response.code))
   end
 
   def failure_tracker