fix: crash when listing non bridge_v1 compatible bridge_v2

Fixes:
https://emqx.atlassian.net/browse/EMQX-11271
This commit is contained in:
Kjell Winblad 2023-10-30 16:32:04 +01:00
parent 19554850a9
commit 8fb426e57f
1 changed files with 7 additions and 3 deletions

View File

@ -233,9 +233,13 @@ list_with_lookup_fun(LookupFun) ->
fun(Name, _RawConf, Acc) ->
[
begin
{ok, BridgeInfo} =
LookupFun(Type, Name),
BridgeInfo
case LookupFun(Type, Name) of
{ok, BridgeInfo} ->
BridgeInfo;
{error, not_bridge_v1_compatible} = Err ->
%% Filtered out by the caller
Err
end
end
| Acc
]