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

fix: improve execute error #46

Merged
merged 2 commits into from
Jul 16, 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
2 changes: 1 addition & 1 deletion src/Orchestration/Adapter/DockerAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ public function execute(

$parsedResponse = json_decode($result['response'], true);
if ($parsedResponse['Running'] === true || $parsedResponse['ExitCode'] !== 0) {
throw new Orchestration('Failed to execute command: '.$result['response'].' Exit Code: '.$parsedResponse['ExitCode']);
throw new Orchestration('Failed to execute command. Exit code: '.$parsedResponse['ExitCode']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're removing the docker API error message, can we make this error message more verbose like how to debug or what are the likely causes of this failure?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only reason this will be thrown is if the user provided build script does not completely successfully. Which is written to the $output reference, there's not really any more detail needed imo

}

return true;
Expand Down
Loading