فهرست منبع

fix(emqx_authz_api): fix error code

EMQ-YangM 3 سال پیش
والد
کامیت
dc8408e378
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      apps/emqx_authz/src/emqx_authz_api_sources.erl

+ 1 - 1
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">>,