Skip to content

Commit d877046

Browse files
Merge pull request #656 from devcontainers/samruddhikhandale/docker-plugi
Updates create error description to include cause for docker auth plugin errors
2 parents d2c1bc8 + 25315e0 commit d877046

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/spec-node/singleContainer.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,14 @@ export async function openDockerfileDevContainer(params: DockerResolverParameter
7171
}
7272

7373
function createSetupError(originalError: any, container: ContainerDetails | undefined, params: DockerResolverParameters, containerProperties: ContainerProperties | undefined, config: DevContainerConfig | undefined): ContainerError {
74+
let description = 'An error occurred setting up the container.';
75+
76+
if (originalError?.cmdOutput?.includes('docker: Error response from daemon: authorization denied by plugin')) {
77+
description = originalError.cmdOutput;
78+
}
79+
7480
const err = originalError instanceof ContainerError ? originalError : new ContainerError({
75-
description: 'An error occurred setting up the container.',
81+
description,
7682
originalError
7783
});
7884
if (container) {

0 commit comments

Comments
 (0)