We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93946ee commit f970753Copy full SHA for f970753
deps/rabbit/src/rabbit_amqp_management.erl
@@ -146,10 +146,8 @@ handle_http_req(HttpMethod = <<"PUT">>,
146
Result;
147
{error, not_found} ->
148
PermCache2 = check_dead_letter_exchange(QName, QArgs, User, PermCache1),
149
- try rabbit_amqqueue:declare(
+ try case rabbit_amqqueue:declare(
150
QName, Durable, AutoDelete, QArgs, Owner, Username) of
151
- ARGS ->
152
- case ARGS of
153
{new, Q} ->
154
rabbit_core_metrics:queue_created(QName),
155
{Q, 0, 0, <<"201">>, PermCache2};
@@ -169,9 +167,7 @@ handle_http_req(HttpMethod = <<"PUT">>,
169
167
Reason,
170
168
ReasonArgs);
171
{protocol_error, _ErrorType, Reason, ReasonArgs} ->
172
- throw(<<"400">>, Reason, ReasonArgs);
173
- {precondition_failed, Reason, ReasonArgs} ->
174
- throw(<<"409">>, Reason, ReasonArgs)
+ throw(<<"400">>, Reason, ReasonArgs)
175
end
176
catch exit:#amqp_error{name = precondition_failed,
177
explanation = Expl} ->
0 commit comments