0
0
Fork 0

Fix 500 error when trying to migrate to an invalid address (#21462)

* Fix 500 error when trying to migrate to an invalid address

* Add tests
This commit is contained in:
Claire 2022-12-07 02:35:39 +01:00 committed by GitHub
parent 21b208afcb
commit b59fb28e90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 2 deletions

View file

@ -59,7 +59,7 @@ class AccountMigration < ApplicationRecord
def set_target_account
self.target_account = ResolveAccountService.new.call(acct, skip_cache: true)
rescue Webfinger::Error, HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::Error
rescue Webfinger::Error, HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::Error, Addressable::URI::InvalidURIError
# Validation will take care of it
end