fix(ft): unwrap error details when reader fails to start

This commit is contained in:
Andrew Mayorov 2023-03-21 00:11:30 +03:00 committed by Ilya Averyanov
parent 45f00e14a9
commit 2880c8f4eb
1 changed files with 6 additions and 1 deletions

View File

@ -33,7 +33,12 @@ start_child(CallerPid, Filename) ->
start => {emqx_ft_storage_fs_reader, start_link, [CallerPid, Filename]},
restart => temporary
},
supervisor:start_child(?MODULE, Childspec).
case supervisor:start_child(?MODULE, Childspec) of
{ok, Pid} ->
{ok, Pid};
{error, {Reason, _Child}} ->
{error, Reason}
end.
init(_) ->
SupFlags = #{