check_http_code_throw_error: HTTP response error handling.

Description Usage Arguments Value

View source: R/utils.R

Description

If an HTTP request returns a status code that is not 200, then this functions throws an exception and prints the prettified response contents to stderr.

Usage

1

Arguments

response

An HTTP response from a request to a search API request.

Value

Exception with prettified JSON response printed to stderr.


elasticsearchr documentation built on July 31, 2019, 1:05 a.m.