about summary refs log tree commit diff
path: root/app/controllers/api/v1/accounts
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-05-02 01:00:08 +0200
committerGitHub <noreply@github.com>2022-05-02 01:00:08 +0200
commit9a3be0ad688ea80fffee78635395141ad2419e8a (patch)
treec407aa4d85c5752fb7409639967634daad8bf86a /app/controllers/api/v1/accounts
parent33f3818d660c67194f94c7ff2bb180f4865e6748 (diff)
Fix error when looking handle with surrounding spaces (#18225)
Diffstat (limited to 'app/controllers/api/v1/accounts')
-rw-r--r--app/controllers/api/v1/accounts/lookup_controller.rb2
1 files changed, 2 insertions, 0 deletions
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