From dc8408e378617a889660da5a7b2f026287aa0be2 Mon Sep 17 00:00:00 2001 From: EMQ-YangM Date: Mon, 21 Mar 2022 14:42:09 +0800 Subject: [PATCH] fix(emqx_authz_api): fix error code --- apps/emqx_authz/src/emqx_authz_api_sources.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/emqx_authz/src/emqx_authz_api_sources.erl b/apps/emqx_authz/src/emqx_authz_api_sources.erl index e6cfd70bf..780ca67a5 100644 --- a/apps/emqx_authz/src/emqx_authz_api_sources.erl +++ b/apps/emqx_authz/src/emqx_authz_api_sources.erl @@ -268,7 +268,7 @@ source(delete, #{bindings := #{type := Type}}) -> source_status(get, #{bindings := #{type := Type}}) -> BinType = atom_to_binary(Type, utf8), case get_raw_source(BinType) of - [] -> {404, #{code => <<"BAD_REQUEST">>, + [] -> {404, #{code => <<"NOT_FOUND">>, message => <<"Not found", BinType/binary>>}}; [#{<<"type">> := <<"file">>}] -> {400, #{code => <<"BAD_REQUEST">>,