faraday adaptar: use a default reason when none is matched by Net::HTTP::STATUS_CODES

Fixes https://github.com/HoneyryderChuck/httpx/issues/76
This commit is contained in:
HoneyryderChuck 2025-02-22 22:28:57 +00:00
parent 7c21c33999
commit 7811cbf3a7

View File

@ -149,7 +149,7 @@ module Faraday
module ResponseMethods module ResponseMethods
def reason def reason
Net::HTTP::STATUS_CODES.fetch(@status) Net::HTTP::STATUS_CODES.fetch(@status, "Non-Standard status code")
end end
end end
end end