Hello, I have to handle this exception: HTTP 502: Response body: Got EOF while waiting for outstanding responses (Koala::Facebook::APIError)
and I have written this test:
it "should handle Koala's error" do
get :test_action
response.should redirect_to root_url
flash[:alert].should == "HTTP 502: Response body: Got EOF while waiting for outstanding responses (Koala::Facebook::APIError)"
end
The file in which is used graph.batch is in lib folder and since I can't use things like redirect_to or something else in these files I decided to handle this error writing rescue block in ApplicationController:
rescue_from Koala::Facebook::APIError do |exception|
redirect_to root_url, :alert => exception.message
end
But then I though that maybe I should handle 502 error and in that case I only have to write 502.html file in public folder. Right?
Can someone help me with the right path to handle this error. Thanks in advance :)
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/C4Vp2aLJSOYJ.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment