Skip to content

Commit a744484

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. (cherry picked from commit 3976d87)
1 parent 792598e commit a744484

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
@@ -33,7 +33,7 @@
3333
validate_policy(KeyList) ->
3434
case proplists:lookup(<<"queue-master-locator">> , KeyList) of
3535
{_, Strategy} -> case validate_strategy(Strategy) of
36-
{error, _} = Er -> Er;
36+
{error, _, _} = Er -> Er;
3737
_ -> ok
3838
end;
3939
_ -> {error, "queue-master-locator undefined"}

0 commit comments

Comments
 (0)