-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hello,
Thanks for this library. I sometimes see HTTP 500 responses from the HCloud API which results in a Jason.DecodeError:
Jason.DecodeError: unexpected byte at position 0: 0x3C ("<")
File "lib/jason.ex", line 92, in Jason.decode!/2
File "lib/httpoison/base.ex", line 977, in HTTPoison.Base.response/8
File "lib/hcloud.ex", line 63, in ClusterHcloud.Hcloud.get_network_id/2
File "lib/strategy/labels.ex", line 108, in ClusterHcloud.Strategy.Labels.get_nodes/1
File "lib/strategy/labels.ex", line 58, in ClusterHcloud.Strategy.Labels.load/1
File "lib/strategy/labels.ex", line 54, in ClusterHcloud.Strategy.Labels.handle_info/2
File "gen_server.erl", line 2345, in :gen_server.try_handle_info/3
File "gen_server.erl", line 2433, in :gen_server.handle_msg/6
Looks like the HTTPoison parse_response_body gets called even when the status is non-200. Implementing parse_response might be a better solution instead:
nelsonic
Metadata
Metadata
Assignees
Labels
No labels