Commit 3addf94
committed
Be more defensive with certain responses
In Erlang historically (up until Erlang 17 or so)
maps were expressed as lists of pairs, or proplists.
This is still the case with some libraries today,
including JSON generators. Therefore sometimes
a RabbitMQ API response contains an empty array
instead of an empty object (since in Erlang before maps,
they were the same thing).
This drive-by change avoids a Hashie hash
being instantiated with an array, which throws
an exception.
This condition is increasingly rare to come by
but still can be hit with some RabbitMQ HTTP API
endpoints in certain conditions.1 parent 29ecbce commit 3addf94
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
| |||
0 commit comments