Core/src/RequestWrapper.php
private function getExceptionMessage(\Exception $ex)
    {
        if ($ex instanceof RequestException && $ex->hasResponse()) {
            return (string) $ex->getResponse()->getBody();

            try {
                $this->jsonDecode($res);
                return $res;
            } catch (\InvalidArgumentException $e) {
                // no-op
            }
        }

        return $ex->getMessage();
    }
private function getExceptionMessage(\Exception $ex)
    {
        if ($ex instanceof RequestException && $ex->hasResponse()) {
            return (string) $ex->getResponse()->getBody();

            try {
                $this->jsonDecode($res);
                return $res;
            } catch (\InvalidArgumentException $e) {
                // no-op
            }
        }

        return $ex->getMessage();
    }
private function getExceptionMessage ( \ Exception $ ex ) { if ( $ ex instanceof RequestException && $ ex -> hasResponse ( ) ) { return ( string ) $ ex -> getResponse ( ) -> getBody ( ) ; try { $ this -> jsonDecode ( $ res ) ; return $ res ; } catch ( \ InvalidArgumentException $ e ) { // no-op } } return $ ex -> getMessage ( ) ; }
Gets the exception message.

@access private
@param \Exception $ex
@return string
Gets the exception message .