summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiana Corbacho <diana@rabbitmq.com>2019-05-02 16:08:56 +0100
committerDiana Corbacho <diana@rabbitmq.com>2019-05-02 16:34:39 +0100
commit4df419870b664ed5ebd336207a1a33691839fc9c (patch)
tree45446f8e60b0f78585a432c9a9268dca452e9f1e
parent45402b9454a12f6b1a9be3ff1827ed4ee74da7d1 (diff)
downloadrabbitmq-server-git-4df419870b664ed5ebd336207a1a33691839fc9c.tar.gz
Policy validation must return 'ok' or an error
Any other value will break the validation cycle and leave the rest of the arguments without validate [#165689664]
-rw-r--r--src/rabbit_queue_location_validator.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rabbit_queue_location_validator.erl b/src/rabbit_queue_location_validator.erl
index ad6bb292ab..2638b79a59 100644
--- a/src/rabbit_queue_location_validator.erl
+++ b/src/rabbit_queue_location_validator.erl
@@ -33,7 +33,10 @@
validate_policy(KeyList) ->
case proplists:lookup(<<"queue-master-locator">> , KeyList) of
- {_, Strategy} -> validate_strategy(Strategy);
+ {_, Strategy} -> case validate_strategy(Strategy) of
+ {error, _} = Er -> Er;
+ _ -> ok
+ end;
_ -> {error, "queue-master-locator undefined"}
end.