Skip to content

Commit a883902

Browse files
Log stacktrace when container runtime strategy throws (#794)
1 parent d623522 commit a883902

File tree

1 file changed

+4
-1
lines changed
  • packages/testcontainers/src/container-runtime/clients

1 file changed

+4
-1
lines changed

packages/testcontainers/src/container-runtime/clients/client.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ export async function getContainerRuntimeClient(): Promise<ContainerRuntimeClien
5555
return client;
5656
}
5757
} catch (err) {
58-
log.debug(`Container runtime strategy "${strategy.getName()}" does not work: ${err}`);
58+
log.debug(`Container runtime strategy "${strategy.getName()}" does not work: "${err}"`);
59+
if (err !== null && typeof err === "object" && "stack" in err && typeof err.stack === "string") {
60+
log.debug(err.stack);
61+
}
5962
}
6063
}
6164
throw new Error("Could not find a working container runtime strategy");

0 commit comments

Comments
 (0)