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

Updates create error description to include cause for docker auth plugin errors #656

Merged
merged 3 commits into from
Oct 13, 2023
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
8 changes: 7 additions & 1 deletion src/spec-node/singleContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,14 @@ export async function openDockerfileDevContainer(params: DockerResolverParameter
}

function createSetupError(originalError: any, container: ContainerDetails | undefined, params: DockerResolverParameters, containerProperties: ContainerProperties | undefined, config: DevContainerConfig | undefined): ContainerError {
let description = 'An error occurred setting up the container.';

if (originalError?.cmdOutput?.includes('docker: Error response from daemon: authorization denied by plugin')) {
description = originalError.cmdOutput;
}

const err = originalError instanceof ContainerError ? originalError : new ContainerError({
description: 'An error occurred setting up the container.',
description,
originalError
});
if (container) {
Expand Down
Loading