mirror of https://github.com/oxen-io/lokinet
prevent throwing on no error in lokinet-vpn
This commit is contained in:
parent
0bb58b4ac0
commit
0cf637178d
|
@ -241,9 +241,10 @@ main(int argc, char* argv[])
|
||||||
if (not maybe_result)
|
if (not maybe_result)
|
||||||
return exit_error("could not add exit");
|
return exit_error("could not add exit");
|
||||||
|
|
||||||
if (auto err_it = maybe_result->find("error"); err_it != maybe_result->end())
|
if (auto err_it = maybe_result->find("error");
|
||||||
|
err_it != maybe_result->end() and not err_it.value().is_null())
|
||||||
{
|
{
|
||||||
return exit_error("{}", err_it->get<std::string_view>());
|
return exit_error("{}", err_it.value());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (goDown)
|
if (goDown)
|
||||||
|
|
Loading…
Reference in New Issue