diff options
| author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2019-05-03 10:21:44 +0200 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2019-05-03 10:21:44 +0200 |
| commit | 3976d87c9a3e2e4e45a7519ab52157a82524fd0a (patch) | |
| tree | 4643f92b32938097c3a5dd23d850e75d974d516a /src | |
| parent | 3cfcacbbd929c3cf0788628b65380c0c5dc92b1f (diff) | |
| download | rabbitmq-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.erl | 2 |
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"} |
