We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2fc685 commit f235177Copy full SHA for f235177
lib/rig_inbound_gateway/api_proxy/response_from_parser.ex
@@ -51,5 +51,9 @@ defmodule RigInboundGateway.ApiProxy.ResponseFromParser do
51
# ---
52
53
defp to_int(value) when is_integer(value), do: value
54
- defp to_int(value) when is_binary(value), do: String.to_integer(value)
+ defp to_int(string) when is_binary(string) do
55
+ String.to_integer(string)
56
+ rescue
57
+ ArgumentError -> {:error, {:not_an_integer, string}}
58
+ end
59
end
0 commit comments