src/V2/Pagination/PaginationHandler.php
public function onError( ResponseInterface $response, RequestInterface $request ) {
        $json = $this->getResponseAsJson( $response );
        if( !is_null( $json ) && isset( $json->text )) {
            if( strpos( $json->text, 'page out of range.' ) === 0 ) {
                throw new PageOutOfRangeException( $json->text, $response );
            }
        }
    }
public function onError( ResponseInterface $response, RequestInterface $request ) {
        $json = $this->getResponseAsJson( $response );
        if( !is_null( $json ) && isset( $json->text )) {
            if( strpos( $json->text, 'page out of range.' ) === 0 ) {
                throw new PageOutOfRangeException( $json->text, $response );
            }
        }
    }
public function onError ( ResponseInterface $ response , RequestInterface $ request ) { $ json = $ this -> getResponseAsJson ( $ response ) ; if ( ! is_null ( $ json ) && isset ( $ json -> text ) ) { if ( strpos ( $ json -> text , 'page out of range.' ) === 0 ) { throw new PageOutOfRangeException ( $ json -> text , $ response ) ; } } }
Handle PageOutOfRangeExceptions.

@param ResponseInterface $response
@param RequestInterface  $request

@throws PageOutOfRangeException
Handle PageOutOfRangeExceptions .