fix(gw): fix bad_ssl_config bad match

This commit is contained in:
JianBo He 2022-05-03 11:58:27 +08:00
parent 5d362eeb60
commit 5698b9cfeb
1 changed files with 3 additions and 2 deletions

View File

@ -514,8 +514,9 @@ with_gateway(GwName0, Fun) ->
), ),
return_http_error(404, "Resource not found. path: " ++ Path); return_http_error(404, "Resource not found. path: " ++ Path);
%% Exceptions from emqx_gateway_conf:convert_certs/2,3 %% Exceptions from emqx_gateway_conf:convert_certs/2,3
error:{bad_ssl_config, #{which_option := Option}} -> error:{bad_ssl_config, Reason0} ->
return_http_error(400, ["Bad SSL config, option: ", Option]); Reason = emqx_gateway_utils:stringfy(Reason0),
return_http_error(400, ["Bad SSL config, reason: ", Reason]);
Class:Reason:Stk -> Class:Reason:Stk ->
?SLOG(error, #{ ?SLOG(error, #{
msg => "uncatched_error", msg => "uncatched_error",