From 9a3be0ad688ea80fffee78635395141ad2419e8a Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 2 May 2022 01:00:08 +0200 Subject: Fix error when looking handle with surrounding spaces (#18225) --- app/controllers/api/v1/accounts/lookup_controller.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/controllers/api') diff --git a/app/controllers/api/v1/accounts/lookup_controller.rb b/app/controllers/api/v1/accounts/lookup_controller.rb index aee6be18a..8597f891d 100644 --- a/app/controllers/api/v1/accounts/lookup_controller.rb +++ b/app/controllers/api/v1/accounts/lookup_controller.rb @@ -12,5 +12,7 @@ class Api::V1::Accounts::LookupController < Api::BaseController def set_account @account = ResolveAccountService.new.call(params[:acct], skip_webfinger: true) || raise(ActiveRecord::RecordNotFound) + rescue Addressable::URI::InvalidURIError + raise(ActiveRecord::RecordNotFound) end end -- cgit