Skip to content

Conversation

WyriHaximus
Copy link
Member

No description provided.

}, function (Payload $payload) {
return \React\Promise\reject(new Exception($payload->getPayload()['error']['error']['message']));
}, function ($payload) {
return \React\Promise\reject(new Exception($payload['error']['message']));
Copy link
Member

Choose a reason for hiding this comment

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

The title suggests there must be a way to verify this is "the correct way"? :shipit:

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah using array access and ditching the extra error index solve the errors.

(Also updated the title.)

Copy link
Member

Choose a reason for hiding this comment

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

Is this tested or can we add some tests for this? 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a test for this 👍

@WyriHaximus WyriHaximus changed the title Get the error from the child process in the correct way Use array access, and remove unnecessary double error from array lookup May 29, 2018
@jsor jsor merged commit 6006008 into reactphp:master Jun 18, 2018
WyriHaximus added a commit to WyriHaximus-labs/filesystem that referenced this pull request Feb 14, 2021
WyriHaximus added a commit to WyriHaximus-labs/filesystem that referenced this pull request Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants