summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-01-23 09:23:18 +0100
committerAzul <azul@leap.se>2013-01-23 09:25:06 +0100
commitdef5a00415ebced58bb0f7c1254f6cbedb27a23f (patch)
tree2cb30a9ed81802cac6dfcd7b5b520d436503d603 /users
parentefe76ee1d9badbad12b0cc42affb7b3d0572797c (diff)
make raising not found error less confusing
Diffstat (limited to 'users')
-rw-r--r--users/app/controllers/webfinger_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/users/app/controllers/webfinger_controller.rb b/users/app/controllers/webfinger_controller.rb
index d3a4ad3..f28dd3e 100644
--- a/users/app/controllers/webfinger_controller.rb
+++ b/users/app/controllers/webfinger_controller.rb
@@ -10,7 +10,8 @@ class WebfingerController < ApplicationController
def search
username = params[:q].split('@')[0].to_s.downcase
- user = User.find_by_login(username) || not_found
+ user = User.find_by_login(username)
+ raise RECORD_NOT_FOUND, 'User not found' unless user.present?
@subject = Webfinger::UserPresenter.new(user, request)
respond_with @subject
end