From 6a330563ce535f5bd8d14498f94cd9be7fe422f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20Cogolu=C3=A8gnes?= Date: Wed, 3 Jan 2024 18:15:03 +0100 Subject: [PATCH] Return error atom according to specification In stream topology function call. This would trigger an exception in the frame creation when the stream was not available because the atom was unexpected. --- deps/rabbitmq_stream/src/rabbit_stream_manager.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deps/rabbitmq_stream/src/rabbit_stream_manager.erl b/deps/rabbitmq_stream/src/rabbit_stream_manager.erl index 3ea6ccc86f29..ebd69ad4423f 100644 --- a/deps/rabbitmq_stream/src/rabbit_stream_manager.erl +++ b/deps/rabbitmq_stream/src/rabbit_stream_manager.erl @@ -418,8 +418,10 @@ handle_call({topology, VirtualHost, Stream}, _From, State) -> #{leader_node => undefined, replica_nodes => []}, Members)}; - _ -> - {error, not_available} + Err -> + rabbit_log:info("Error locating ~tp stream members: ~tp", + [StreamName, Err]), + {error, stream_not_available} end; {error, not_found} -> {error, stream_not_found};