Neos.Neos/Classes/Service/Controller/AbstractServiceController.php
public function errorAction()
    {
        if ($this->arguments->getValidationResults()->hasErrors()) {
            $errors = [];
            foreach ($this->arguments->getValidationResults()->getFlattenedErrors() as $propertyName => $propertyErrors) {
                foreach ($propertyErrors as $propertyError) {
                    /** @var \Neos\Error\Messages\Error $propertyError */
                    $error = [
                        'severity' => $propertyError->getSeverity(),
                        'message' => $propertyError->render()
                    ];
                    if ($propertyError->getCode()) {
                        $error['code'] = $propertyError->getCode();
                    }
                    if ($propertyError->getTitle()) {
                        $error['title'] = $propertyError->getTitle();
                    }
                    $errors[$propertyName][] = $error;
                }
            }
            $this->throwStatus(409, null, json_encode($errors));
        }
        $this->throwStatus(400);
    }
public function errorAction()
    {
        if ($this->arguments->getValidationResults()->hasErrors()) {
            $errors = [];
            foreach ($this->arguments->getValidationResults()->getFlattenedErrors() as $propertyName => $propertyErrors) {
                foreach ($propertyErrors as $propertyError) {
                    /** @var \Neos\Error\Messages\Error $propertyError */
                    $error = [
                        'severity' => $propertyError->getSeverity(),
                        'message' => $propertyError->render()
                    ];
                    if ($propertyError->getCode()) {
                        $error['code'] = $propertyError->getCode();
                    }
                    if ($propertyError->getTitle()) {
                        $error['title'] = $propertyError->getTitle();
                    }
                    $errors[$propertyName][] = $error;
                }
            }
            $this->throwStatus(409, null, json_encode($errors));
        }
        $this->throwStatus(400);
    }
public function errorAction ( ) { if ( $ this -> arguments -> getValidationResults ( ) -> hasErrors ( ) ) { $ errors = [ ] ; foreach ( $ this -> arguments -> getValidationResults ( ) -> getFlattenedErrors ( ) as $ propertyName => $ propertyErrors ) { foreach ( $ propertyErrors as $ propertyError ) { /** @var \Neos\Error\Messages\Error $propertyError */ $ error = [ 'severity' => $ propertyError -> getSeverity ( ) , 'message' => $ propertyError -> render ( ) ] ; if ( $ propertyError -> getCode ( ) ) { $ error [ 'code' ] = $ propertyError -> getCode ( ) ; } if ( $ propertyError -> getTitle ( ) ) { $ error [ 'title' ] = $ propertyError -> getTitle ( ) ; } $ errors [ $ propertyName ] [ ] = $ error ; } } $ this -> throwStatus ( 409 , null , json_encode ( $ errors ) ) ; } $ this -> throwStatus ( 400 ) ; }
A preliminary error action for handling validation errors

@return void
A preliminary error action for handling validation errors