Open mhsdesign opened 3 months ago
State of the result in question
Flow Variable Dump Neos\Error\Messages\Result object errors => array(empty) errorsExist => true warnings => array(empty) warningsExist => false notices => array(empty) noticesExist => false propertyResults => array(1) integer 0 => Neos\Error\Messages\Result object errors => array(1) integer 0 => Neos\Flow\Property\TypeConverter\Error\TargetNotFoundError prototype object proxy errorsExist => true warnings => array(empty) warningsExist => false notices => array(empty) noticesExist => false propertyResults => array(empty) parent => Neos\Error\Messages\Result object parent => NULL
The following code breaks with this exception, and after debugging it turns out getFirstError really returns false.
getFirstError
Error: Call to a member function getMessage() on bool
$propertyValue = $this->propertyMapper->convert(...); $messages = $this->propertyMapper->getMessages(); if ($messages->hasErrors()) { throw new \RuntimeException($messages->getFirstError()->getMessage(), 1718976491); }
This seems to be a workaround to really get the first error:
$flattenedErrors = $messages->getFlattenedErrors(); $firstError = current(current($flattenedErrors));
I think this is because we set errorsExist on the parent but the error i inside the propertyResults sub result. Maybe this is how it is and im using it wrongly.
errorsExist
propertyResults
Tested on
Flow 7.3 Flow 8.3
State of the result in question
The following code breaks with this exception, and after debugging it turns out
getFirstError
really returns false.This seems to be a workaround to really get the first error:
I think this is because we set
errorsExist
on the parent but the error i inside thepropertyResults
sub result. Maybe this is how it is and im using it wrongly.Tested on
Flow 7.3 Flow 8.3