Skip to content

Commit 3976d87

Browse files
committed
rabbit_queue_location_validator: Fix pattern in validate_policy/1
validate_strategy/1 error value is `{error, FormatString, Args}`, not the usual `{error, Reason}`. This incorrect pattern matching was found thanks to the `set_policy_command_test.exs` testsuite in rabbitmq-cli.
1 parent 3cfcacb commit 3976d87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rabbit_queue_location_validator.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
validate_policy(KeyList) ->
3535
case proplists:lookup(<<"queue-master-locator">> , KeyList) of
3636
{_, Strategy} -> case validate_strategy(Strategy) of
37-
{error, _} = Er -> Er;
37+
{error, _, _} = Er -> Er;
3838
_ -> ok
3939
end;
4040
_ -> {error, "queue-master-locator undefined"}

0 commit comments

Comments
 (0)