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 { try {
({ domain, port, protocol } = await getVncinfo(serverUuid)); ({ domain, port, protocol } = await getVncinfo(serverUuid));
} catch (error) { } catch (error) {
throw new Error( stderr(`Failed to get server ${serverUuid} VNC info; CAUSE: ${error}`);
`Failed to get server ${serverUuid} VNC info; CAUSE: ${error}`,
); return;
} }
return { host: domain, protocol, port }; return { host: domain, protocol, port };

Loading…
Cancel
Save