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

[11.x] Improve Error Handler in the ProcessDriver #53712

Merged
merged 5 commits into from
Nov 29, 2024

Conversation

WillTorres10
Copy link
Contributor

Problem

In the cases when the processes finish with error, the return of $result->output() isn't the expected array. So, when the json_decode($result->output(), true) run, the return will be null. This cause a offset error when try check the 'successful' in the result.

Solution

I propose to check if the process doesn't failed before run the json_decode($result->output(), true). In case of fail, a Exception will be throwed with a more comprehensive message about the error

@taylorotwell taylorotwell merged commit 70c4665 into laravel:11.x Nov 29, 2024
37 of 38 checks passed
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.

2 participants