mirror of
https://github.com/OpenMANET/morse-feed.git
synced 2025-12-10 21:06:28 -06:00
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:
parent
c0be5e1aaa
commit
f865245e5c
@ -409,7 +409,10 @@ function fetch_config(url) {
|
|||||||
|
|
||||||
function find_service_url(ubus, dhcp_server_ipv4) {
|
function find_service_url(ubus, dhcp_server_ipv4) {
|
||||||
const services = find_services(ubus, SERVICE);
|
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));
|
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`);
|
assert(url, `Unable to construct valid wizard config URL from service: ${services}\n`);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user