protected function renderResponse(HttpException $exception): JsonResponse
    {
        return app(Responder::class)
            ->error($exception->errorCode(), $exception->message())
            ->data($exception->data())
            ->respond($exception->statusCode(), $exception->getHeaders());
    }
protected function renderResponse(HttpException $exception): JsonResponse
    {
        return app(Responder::class)
            ->error($exception->errorCode(), $exception->message())
            ->data($exception->data())
            ->respond($exception->statusCode(), $exception->getHeaders());
    }
protected function renderResponse ( HttpException $ exception ) : JsonResponse { return app ( Responder :: class ) -> error ( $ exception -> errorCode ( ) , $ exception -> message ( ) ) -> data ( $ exception -> data ( ) ) -> respond ( $ exception -> statusCode ( ) , $ exception -> getHeaders ( ) ) ; }
Render an error response from an API exception.

@param  \Flugg\Responder\Exceptions\Http\HttpException $exception
@return \Illuminate\Http\JsonResponse
Render an error response from an API exception .