Poison.decode/2 raises an exception when interger is given
relip opened this issue · comments
Larry Kim commented
In the Poison document Poison.decode/2 should return an exception on error, instead it raises an exception when parameter is invalid such as nil
or an integer.
Trace:
:erlang.iolist_to_binary(1)
(poison) lib/poison/parser.ex:35: Poison.Parser.parse/2
(poison) lib/poison.ex:69: Poison.decode/2
I assume adding ArgumentError into the rescue exception list would be the simplest way?
Line 56 in 5853ab4