src/Traits/MicroServiceExceptionHandlerTrait.php
protected function handleHttpException(Exception $e)
    {
        $statusCode = $e->getStatusCode();

        // if there is no exception message just get the standard HTTP text.
        if (empty($e->getMessage())) {
            $message = Response::$statusTexts[$statusCode];
        } else {
            $message = $e->getMessage();
        }

        return $this->generateResponse('', null, $statusCode, Status::FAIL, $message);
    }
protected function handleHttpException(Exception $e)
    {
        $statusCode = $e->getStatusCode();

        // if there is no exception message just get the standard HTTP text.
        if (empty($e->getMessage())) {
            $message = Response::$statusTexts[$statusCode];
        } else {
            $message = $e->getMessage();
        }

        return $this->generateResponse('', null, $statusCode, Status::FAIL, $message);
    }
protected function handleHttpException ( Exception $ e ) { $ statusCode = $ e -> getStatusCode ( ) ; // if there is no exception message just get the standard HTTP text. if ( empty ( $ e -> getMessage ( ) ) ) { $ message = Response :: $ statusTexts [ $ statusCode ] ; } else { $ message = $ e -> getMessage ( ) ; } return $ this -> generateResponse ( '' , null , $ statusCode , Status :: FAIL , $ message ) ; }
Handle a HTTP exception and build return data.

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