Browse Source

Rescue Mastodon::LengthValidationError in Remoteable (#7228)

Fix #7198 by allowing records with optional attachments to save
pull/4/head
Eugen Rochko 6 years ago
committed by GitHub
parent
commit
4ca2f73b12
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/models/concerns/remotable.rb

+ 1
- 1
app/models/concerns/remotable.rb View File

@ -38,7 +38,7 @@ module Remotable
self[attribute_name] = url if has_attribute?(attribute_name)
end
rescue HTTP::TimeoutError, HTTP::ConnectionError, OpenSSL::SSL::SSLError, Paperclip::Errors::NotIdentifiedByImageMagickError, Addressable::URI::InvalidURIError, Mastodon::HostValidationError => e
rescue HTTP::TimeoutError, HTTP::ConnectionError, OpenSSL::SSL::SSLError, Paperclip::Errors::NotIdentifiedByImageMagickError, Addressable::URI::InvalidURIError, Mastodon::HostValidationError, Mastodon::LengthValidationError => e
Rails.logger.debug "Error fetching remote #{attachment_name}: #{e}"
nil
end

Loading…
Cancel
Save