Extract wrapper constant for HTTP::*
error classes (#32285)
This commit is contained in:
parent
f49161ab1d
commit
e8ec6667bd
21 changed files with 29 additions and 23 deletions
|
@ -10,7 +10,7 @@ class VerifyLinkService < BaseService
|
|||
return unless link_back_present?
|
||||
|
||||
field.mark_verified!
|
||||
rescue OpenSSL::SSL::SSLError, HTTP::Error, Addressable::URI::InvalidURIError, Mastodon::HostValidationError, Mastodon::LengthValidationError, IPAddr::AddressFamilyError => e
|
||||
rescue OpenSSL::SSL::SSLError, *Mastodon::HTTP_CONNECTION_ERRORS, Addressable::URI::InvalidURIError, Mastodon::HostValidationError, Mastodon::LengthValidationError, IPAddr::AddressFamilyError => e
|
||||
Rails.logger.debug { "Error fetching link #{@url}: #{e}" }
|
||||
nil
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue