mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-23 13:05:12 +01:00
checking http status code with range (#7544)
This commit is contained in:
parent
4b94e9c65e
commit
587da93152
@ -44,11 +44,11 @@ class ActivityPub::DeliveryWorker
|
|||||||
end
|
end
|
||||||
|
|
||||||
def response_successful?(response)
|
def response_successful?(response)
|
||||||
response.code > 199 && response.code < 300
|
(200...300).cover?(response.code)
|
||||||
end
|
end
|
||||||
|
|
||||||
def response_error_unsalvageable?(response)
|
def response_error_unsalvageable?(response)
|
||||||
response.code > 399 && response.code < 500 && response.code != 429
|
(400...500).cover?(response.code) && response.code != 429
|
||||||
end
|
end
|
||||||
|
|
||||||
def failure_tracker
|
def failure_tracker
|
||||||
|
Loading…
Reference in New Issue
Block a user