Skip to content

Commit

Permalink
Merge pull request devcontainers#656 from devcontainers/samruddhikhan…
Browse files Browse the repository at this point in the history
…dale/docker-plugi

Updates create error description to include cause for docker auth plugin errors
  • Loading branch information
samruddhikhandale authored Oct 13, 2023
2 parents d2c1bc8 + 25315e0 commit d877046
Showing 1 changed file with 7 additions and 1 deletion.
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

0 comments on commit d877046

Please sign in to comment.