src/Traits/MicroServiceExceptionHandlerTrait.php
protected function handleValidationException(Exception $e)
    {
        // Get the status code and build the message.
        $statusCode = 422;
        $message = $e->getMessage();
        $errorData = $e->getResponse()->getData();

        return $this->generateResponse('errors', $errorData, $statusCode, Status::FAIL, $message);
    }
protected function handleValidationException(Exception $e)
    {
        // Get the status code and build the message.
        $statusCode = 422;
        $message = $e->getMessage();
        $errorData = $e->getResponse()->getData();

        return $this->generateResponse('errors', $errorData, $statusCode, Status::FAIL, $message);
    }
protected function handleValidationException ( Exception $ e ) { // Get the status code and build the message. $ statusCode = 422 ; $ message = $ e -> getMessage ( ) ; $ errorData = $ e -> getResponse ( ) -> getData ( ) ; return $ this -> generateResponse ( 'errors' , $ errorData , $ statusCode , Status :: FAIL , $ message ) ; }
Handle a validation exception and build return data.

@param Exception $e
@return mixed
Handle a validation exception and build return data .