Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log stacktrace when container runtime strategy throws #794

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

cristianrgreco
Copy link
Collaborator

@cristianrgreco cristianrgreco commented Jul 8, 2024

To help further debug #785

Copy link

netlify bot commented Jul 8, 2024

Deploy Preview for testcontainers-node ready!

Name Link
🔨 Latest commit e04d23f
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-node/deploys/668ba8d2cff8af0008d0cbf0
😎 Deploy Preview https://deploy-preview-794--testcontainers-node.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@cristianrgreco cristianrgreco added maintenance Improvements that do not change functionality patch Backward compatible bug fix labels Jul 8, 2024
@@ -55,7 +55,10 @@ export async function getContainerRuntimeClient(): Promise<ContainerRuntimeClien
return client;
}
} catch (err) {
log.debug(`Container runtime strategy "${strategy.getName()}" does not work: ${err}`);
log.debug(`Container runtime strategy "${strategy.getName()}" does not work: "${err}"`);
if (err !== null && typeof err === "object" && "stack" in err && typeof err.stack === "string") {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out err is not an instance of Error 🤷

@cristianrgreco cristianrgreco merged commit a883902 into main Jul 8, 2024
94 checks passed
@cristianrgreco cristianrgreco deleted the crun-strategy-print-stacktrace branch July 8, 2024 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Improvements that do not change functionality patch Backward compatible bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant