MatcError on pull client
rockneurotiko opened this issue · comments
I am trying the new version with Finch
in a queue with very low messages, and it's failing with the following error:
** (MatchError) no match of right hand side value: %{}
Backtrace:
lib/broadway_cloud_pub_sub/pull_client.ex:74 BroadwayCloudPubSub.PullClient.handle_response/2
lib/broadway_cloud_pub_sub/pull_client.ex:50 BroadwayCloudPubSub.PullClient.receive_messages/3
lib/broadway_cloud_pub_sub/producer.ex:224 BroadwayCloudPubSub.Producer.handle_receive_messages/1
lib/broadway/topology/producer_stage.ex:107 Broadway.Topology.ProducerStage.handle_demand/2
lib/gen_stage.ex:2134 GenStage.noreply_callback/3
gen_server.erl:695 :gen_server.try_dispatch/4
gen_server.erl:771 :gen_server.handle_msg/6
proc_lib.erl:226 :proc_lib.init_p_do_apply/3
Looking at the PubSub documentation it specifies that the response can be empty: For JSON, the response can be entirely empty.
I'm going to open a PR with a proposal to fix it