fix(emqx_authz_api): fix error code
This commit is contained in:
parent
a34e750ebe
commit
dc8408e378
|
@ -268,7 +268,7 @@ source(delete, #{bindings := #{type := Type}}) ->
|
||||||
source_status(get, #{bindings := #{type := Type}}) ->
|
source_status(get, #{bindings := #{type := Type}}) ->
|
||||||
BinType = atom_to_binary(Type, utf8),
|
BinType = atom_to_binary(Type, utf8),
|
||||||
case get_raw_source(BinType) of
|
case get_raw_source(BinType) of
|
||||||
[] -> {404, #{code => <<"BAD_REQUEST">>,
|
[] -> {404, #{code => <<"NOT_FOUND">>,
|
||||||
message => <<"Not found", BinType/binary>>}};
|
message => <<"Not found", BinType/binary>>}};
|
||||||
[#{<<"type">> := <<"file">>}] ->
|
[#{<<"type">> := <<"file">>}] ->
|
||||||
{400, #{code => <<"BAD_REQUEST">>,
|
{400, #{code => <<"BAD_REQUEST">>,
|
||||||
|
|
Loading…
Reference in New Issue