diff options
author | ThibG <thib@sitedethib.com> | 2019-05-23 15:00:30 +0200 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-11-19 13:34:01 -0600 |
commit | a8ae1e4855f4e2f9cb9e531e596af53ec89a42b1 (patch) | |
tree | 3774982a4f023701db870f9ac6da62ee6837bc84 /app/workers | |
parent | 918b7866dd50ab7c383889f56761f7b3df615a27 (diff) |
Retry ActivityPub inbox delivery on HTTP 401 and 408 errors (#10812)
HTTP 401 responses returned by Mastodon's inbox controller may be temporary if, for instance, the requesting user's actor/key json could not be retrieved in a timely fashion. This changes allow retries instead of dropping the message entirely. Also added HTTP 408 as that error is by nature temporary.
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/activitypub/delivery_worker.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/workers/activitypub/delivery_worker.rb b/app/workers/activitypub/delivery_worker.rb index f9c385ea3..5e4c391f0 100644 --- a/app/workers/activitypub/delivery_worker.rb +++ b/app/workers/activitypub/delivery_worker.rb @@ -51,7 +51,7 @@ class ActivityPub::DeliveryWorker end def response_error_unsalvageable?(response) - (400...500).cover?(response.code) && response.code != 429 + (400...500).cover?(response.code) && ![401, 408, 429].include?(response.code) end def failure_tracker |