Open thomasdola opened 7 years ago
We are looking into this issue. Thank you for reporting!
Hi @thomasdola Thanks for reporting the issue. I managed to reproduce the issue and it happens some time that authentication timeouts in rare cases. We will update library but it could be breaking change. We need to change return type for some functions which so far didn't return tuple {:ok, result} or {:error, error}.
I will let you know when this is done, and write little breakdown about which functions are changed.
Thank you Milan Jaric
thank you.. Another thing i noticed was anytime i start the server it tries to make a request to rackspace. the issue with this is that in case i do not have internet or internet is being slow, it affects everything.. including running test, booting the server... is there any solution to this..? Or is it by design? If yes why? thanks...
I'm preparing new version which should return {:error, something} for all function calls. So it should help you to decide if you want to teardown your app or not, or repeat same call again, or something else. I doubt that first author of this library had in mind design where it should teardown your app, it is just missed case in code.
thanks.. so when can we expect this update?
Next week.
@thomasdola this should be fixed now. Could you please give it a try from latest master commit. Please note that error (the timeout) will be bubbled back as return value of any call which fails to complete in given timeframe as %Rackspace.Error{code: 0, message: "req_timedout"}
so you can do pattern match with case for instance. If that happens you could either retry with same parameters or let process crash ...
There is one more thing. In case of bad network connectivity, if you are starting application and try to execute any function the error will be probably %Rackspace.Error{code: 0, message: "nxdomain"}
if auth could not pass due lack of DNS name resolution. All network related errors have code equal to 0 (zero)
Let me know if latest version works for you so I can close the issue.
Thanks!
== Compilation error in file lib/rackspace/api/cloud_files/container.ex == ** (CompileError) lib/rackspace/api/cloud_files/container.ex:35: undefined function base_url/1 (stdlib) lists.erl:1338: :lists.foreach/2 (stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
Could you please tell me which elixir and erlang version you are using?
elixir v1.5.1.1 erlang v20.0.1
keep getting this error anytime i try to upload..
** (KeyError) key :status_code not found in: %HTTPotion.ErrorResponse{message: "req_timedout"}
any help ?