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 );
            }
        }
    }