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

Docker compose: Updates create error description to include cause for docker auth plugin errors #660

Merged
merged 1 commit into from
Oct 24, 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
Docker compose: Update description
  • Loading branch information
samruddhikhandale committed Oct 19, 2023
commit 5ce1f6cea20a51a634cba877c00a7e7422928314
8 changes: 7 additions & 1 deletion src/spec-node/dockerCompose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,13 @@ async function startContainer(params: DockerResolverParameters, buildParams: Doc
}
} catch (err) {
cancel!();
throw new ContainerError({ description: 'An error occurred starting Docker Compose up.', originalError: err, data: { fileWithError: localComposeFiles[0] } });

let description = 'An error occurred starting Docker Compose up.';
if (err?.cmdOutput?.includes('Cannot create container for service app: authorization denied by plugin')) {
description = err.cmdOutput;
}

throw new ContainerError({ description, originalError: err, data: { fileWithError: localComposeFiles[0] } });
}

await started;
Expand Down
Loading