Browse files

Rohit/Akriti changed error message to not logged in instead of daily …

…share limit exceeded
  • Loading branch information...
1 parent 336241a commit dd429b2cbb29480e0a1139dbe59e2b0bb75f9ca6 @rohitggarg rohitggarg committed Feb 21, 2013
@@ -8,7 +8,7 @@ def employers
@employers = my_employers
rescue Exception => ex
- log_exception_and_render_as_json(ex)
+ render json: { message: "You are probably not logged in" }, status: :not_found
woodhull Feb 26, 2013 ControlShift member

Can't we tell whether the user is logged in?

@@ -51,7 +51,7 @@
get :employers
response.should_not be_successful
- response.body.should == { message: user_prompt }.to_json
+ response.body.should == { message: "You are probably not logged in" }.to_json
describe "#share" do

1 comment on commit dd429b2


It seems kind of messy to assume this if there is a way to detect the actual error. The log_exception_and_render message is actually important since it was sending the exception message along to us, and just returning a message doesn't let us know that there was a problem.

I'd rather verify that the user is logged in before attempting to retrieve the employer data, rather than relying on assuming the exception means that. :-)

Please sign in to comment.