Log the message of an instance start error without a stack (#1066)

HostRouter.wakeInstance() logged err.stack, which RequestError leaves
undefined, so a failed start was logged as "Error starting instance:
undefined" and the reason, such as no game port left in the range, was
lost.


Claude-Session: https://claude.ai/code/session_01F7obMEi4L4PzUQ8w8q9Uyz

Co-authored-by: ILLISIS <jayson.harris01@gmail.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
authored and GitHub committed 2026-10-12 00:00:01 +01:00
1 parent ae6e25d1b9
commit dc9096303c
2 files changed
+30 -2

No files matched your search

+1 -1
View File
@@ -218,7 +218,7 @@ export class HostRouter {
this.host._connectInstance(dst.id).then(instanceConnection => {
instanceConnection.connector.forward(message);
}).catch(err => {
logger.error(`Error starting instance:\n${err.stack}`, this.host.instanceLogMeta(dst.id));
logger.error(`Error starting instance:\n${err.stack ?? err.message}`, this.host.instanceLogMeta(dst.id));
origin.connector.sendResponseError(
new lib.ResponseError(err.message, err.code, err.stack), message.src
);