Improve error message if supervisor0 network not found

Signed-off-by: Christina Ying Wang <christina@balena.io>
This commit is contained in:
Christina Ying Wang 2022-11-09 10:21:58 -08:00
parent 1034aa70e6
commit af0bb87def

View File

@ -79,8 +79,11 @@ export async function supervisorNetworkReady(): Promise<boolean> {
network.IPAM.Config[0].Subnet === subnet && network.IPAM.Config[0].Subnet === subnet &&
network.IPAM.Config[0].Gateway === gateway; network.IPAM.Config[0].Gateway === gateway;
return result; return result;
} catch (e) { } catch (e: unknown) {
log.warn(`Failed to read docker configuration of network ${iface}:`, e); log.warn(
`Failed to read docker configuration of network ${iface}:`,
(e as Error).message,
);
return false; return false;
} }
} }