app/Exceptions/Handler.php
/**
     * Render an exception into an HTTP response.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Throwable  $exception
     * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
     *
     * @throws \Throwable
     */
Render an exception into an HTTP response.

@throws \Throwable
Render an exception into an HTTP response . @throws \ Throwable
public function render($request, Throwable $exception)
    {
        if ($exception instanceof ClientException) {
            $message = $exception->getResponse()->getBody();
            $code = $exception->getCode();
            return $this->errorMessage($message,200);
        }
        return parent::render($request, $exception);
    }
public function render ( $ request , Throwable $ exception ) { if ( $ exception instanceof ClientException ) { $ message = $ exception -> getResponse ( ) -> getBody ( ) ; $ code = $ exception -> getCode ( ) ; return $ this -> errorMessage ( $ message , 200 ) ; } return parent :: render ( $ request , $ exception ) ; }
Render an exception into an HTTP response.
Render an exception into an HTTP response .