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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 🤷

log.debug(err.stack);
}
}
}
throw new Error("Could not find a working container runtime strategy");
Expand Down
Loading