New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined method `response' for #<Excon::Errors::SocketError:0x0000001044da08> #789
Comments
@manuelmeurer You are correct that SocketError isn't really expected here, but that it should be handled if it comes up. I think the respond_to you mentioned should handle it nicely. Could you create a pull request with that change? Thanks! |
I don't think using respond_to? in this way is the right thing to do here. if response gets set to error.message, error.message will not have a Any chance you can duplicate now and provide the exact SocketError message? I think it may be a configuration issue and Fog should probably handle that better. |
@freeformz you make a good point, I hadn't considered the .headers requirement shortly thereafter. |
Yes, you are right. Maybe it would be best to just rescue |
On top of what @freeformz noticed I wrote
|
The error only happens with fog 1.1.2, with 1.1.1 all works fine (using same version of excon and backup gem). |
Sorry, fog 1.1.1 uses an older version of the Excon gem (0.7.12) which might be the issue. |
@manuelmeurer yep, older excon did not ssl verify by default, but new excon does do so. |
I have tried to apply this patch yesterday and noticed, that it should be "respond_to?" not "respond_to" |
I just ran into the same issue with a newly build ubuntu server. It does not happen with an older ubuntu server I've been using for staging. I have,
The fact that it only fails in one of these servers is making me think that this could be a dependency that is missing. Will look into this some more and report back if I find something |
@shyam-habarakada - thanks for the update. I think this fix was in fog 1.2, so you may need to update in order to take advantage of it. |
@geemus aren't bug fixes supposed to go into patch-level releases? I mean 1.1.2 -> 1.1.3. |
@semaperepelitsa - generally yes, but some other larger things were released at the same time which seemed to warrant the minor bump. Sorry for the confusion. |
I'm getting this error when trying to use the backup gem. I updated the gem to a new version, so it may very well be that my configuration is incorrect and causes this error in the first place, but it seems to be a bug in fog because it tries to call
response
on aExcon::Errors::SocketError
which doesn't have aresponse
method.Fog seems to expect a
HTTPStatusError
or a descendent thereof, which has aresponse
method.The errors are defined in https://github.com/geemus/excon/blob/master/lib/excon/errors.rb
A simple
respond_to?(:response)
call should fix this...?Backtrace:
The text was updated successfully, but these errors were encountered: