diff options
| -rw-r--r-- | gui/src/main/daemon-rpc.ts | 12 | ||||
| -rw-r--r-- | gui/src/main/index.ts | 1 |
2 files changed, 9 insertions, 4 deletions
diff --git a/gui/src/main/daemon-rpc.ts b/gui/src/main/daemon-rpc.ts index 2ef9feb99d..cae04be5ad 100644 --- a/gui/src/main/daemon-rpc.ts +++ b/gui/src/main/daemon-rpc.ts @@ -1155,9 +1155,15 @@ function convertFromDaemonEvent(data: grpcTypes.DaemonEvent): DaemonEvent { return { deviceConfig: convertFromDeviceEvent(deviceConfig) }; } - return { - appVersionInfo: data.getVersionInfo()!.toObject(), - }; + const versionInfo = data.getVersionInfo(); + if (versionInfo !== undefined) { + return { appVersionInfo: versionInfo.toObject() }; + } + + const keys = Object.entries(data.toObject()) + .filter(([, value]) => value !== undefined) + .map(([key]) => key); + throw new Error(`Unknown daemon event received containing ${keys}`); } function convertFromOpenVpnConstraints( diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index f8a9b2497f..c41a8fd804 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -785,7 +785,6 @@ class ApplicationMain { }, (error: Error) => { log.error(`Cannot deserialize the daemon event: ${error.message}`); - log.error(error.stack); }, ); |
