From 0e06e4acaac63036f1a091b84a843192acb75da1 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Sat, 11 Jun 2022 16:22:02 +0200 Subject: [PATCH] fix(emqx_conf): throw exception on clusetr_call falure Not all callers handle error, some even ignore errors! --- apps/emqx_conf/src/emqx_conf.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/emqx_conf/src/emqx_conf.erl b/apps/emqx_conf/src/emqx_conf.erl index fb0082819..8b769097e 100644 --- a/apps/emqx_conf/src/emqx_conf.erl +++ b/apps/emqx_conf/src/emqx_conf.erl @@ -223,7 +223,10 @@ check_cluster_rpc_result(Result) -> Res; %% all MFA return not ok or {ok, term()}. {error, Error} -> - Error + %% a lot of the callers do not handle + %% this error return, some even ignore + %% throw here to ensure the code will not proceed + erlang:throw(Error) end. %% Only gen hot_conf schema, not all configuration fields.