summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2019-05-03 10:21:44 +0200
committerJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2019-05-03 10:21:44 +0200
commit3976d87c9a3e2e4e45a7519ab52157a82524fd0a (patch)
tree4643f92b32938097c3a5dd23d850e75d974d516a /src
parent3cfcacbbd929c3cf0788628b65380c0c5dc92b1f (diff)
downloadrabbitmq-server-git-3976d87c9a3e2e4e45a7519ab52157a82524fd0a.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_queue_location_validator.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rabbit_queue_location_validator.erl b/src/rabbit_queue_location_validator.erl
index 2638b79a59..1c2c0e8d42 100644
--- a/src/rabbit_queue_location_validator.erl
+++ b/src/rabbit_queue_location_validator.erl
@@ -34,7 +34,7 @@
validate_policy(KeyList) ->
case proplists:lookup(<<"queue-master-locator">> , KeyList) of
{_, Strategy} -> case validate_strategy(Strategy) of
- {error, _} = Er -> Er;
+ {error, _, _} = Er -> Er;
_ -> ok
end;
_ -> {error, "queue-master-locator undefined"}