fix(plugins): avoid crashing when fetching error reason
This commit is contained in:
parent
64258120d7
commit
648b8231ef
|
@ -388,7 +388,11 @@ do_install_package(FileName, Bin) ->
|
||||||
end,
|
end,
|
||||||
Filtered
|
Filtered
|
||||||
),
|
),
|
||||||
{error, #{error := Reason}} = hd(Filtered),
|
Reason =
|
||||||
|
case hd(Filtered) of
|
||||||
|
{error, #{error := Reason0}} -> Reason0;
|
||||||
|
{error, #{reason := Reason0}} -> Reason0
|
||||||
|
end,
|
||||||
{400, #{
|
{400, #{
|
||||||
code => 'BAD_PLUGIN_INFO',
|
code => 'BAD_PLUGIN_INFO',
|
||||||
message => iolist_to_binary([Reason, ":", FileName])
|
message => iolist_to_binary([Reason, ":", FileName])
|
||||||
|
|
Loading…
Reference in New Issue