fix(striker-ui-api): don't crash API on fetch VNC info error

main
Tsu-ba-me 9 months ago
parent 10087b5c58
commit 41aba69a5a
  1. 6
      striker-ui-api/src/middlewares/proxyServerVnc.ts

@ -27,9 +27,9 @@ export const proxyServerVnc = createProxyMiddleware({
try {
({ domain, port, protocol } = await getVncinfo(serverUuid));
} catch (error) {
throw new Error(
`Failed to get server ${serverUuid} VNC info; CAUSE: ${error}`,
);
stderr(`Failed to get server ${serverUuid} VNC info; CAUSE: ${error}`);
return;
}
return { host: domain, protocol, port };

Loading…
Cancel
Save