wizard-config: (APP-3457, PR #861) don't log exception in this reasonably normal situation

If we're connecting to a normal device (i.e. not Artini) then
the wizard-config service won't be running. Since this is not
really an exceptional situation, don't spew stacktraces
(that end up in syslog).


Approved-by: Sophronia Koilpillai
Approved-by: Evan Benn
This commit is contained in:
James Haggerty 2024-09-24 04:45:48 +00:00 committed by Arien Judge
parent c0be5e1aaa
commit f865245e5c

View File

@ -409,7 +409,10 @@ function fetch_config(url) {
function find_service_url(ubus, dhcp_server_ipv4) {
const services = find_services(ubus, SERVICE);
assert(services && length(services) > 0, `Unable to find a '${SERVICE}' service; doing nothing\n`);
if (!services || length(services) === 0) {
print(`Unable to find a '${SERVICE}' service; doing nothing\n`);
exit(1);
}
const url = get_url_from_service(get_best_service(services, dhcp_server_ipv4));
assert(url, `Unable to construct valid wizard config URL from service: ${services}\n`);