Skip to content

fix: improve execute error - #46

Merged
christyjacob4 merged 2 commits into
mainfrom
fix-improve-execute-error
Jul 16, 2024
Merged

christyjacob4 merged 2 commits into
mainfrom
fix-improve-execute-error

Conversation

@loks0n

@loks0n loks0n commented Jul 4, 2024 •

Copy link
Copy Markdown
Contributor

Executor is throwing error that includes docker API response:

image

Instead, we should just show the failed build logs.

@loks0n
loks0n requested review from Meldiron and christyjacob4 July 12, 2024 11:44
$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
Copy Markdown
Contributor

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
Copy Markdown
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

@loks0n
loks0n requested review from christyjacob4 and vermakhushboo and removed request for christyjacob4 July 15, 2024 10:16
@christyjacob4
christyjacob4 merged commit cae1ae4 into main Jul 16, 2024
@christyjacob4
christyjacob4 deleted the fix-improve-execute-error branch July 16, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants