dot-get_raw_response_body_or_stop: Package-internal HTTP-response helper

.get_raw_response_body_or_stopR Documentation

Package-internal HTTP-response helper

Description

This is a package-internal function for code-deduplication within various manual-layer functions.

Usage

.get_raw_response_body_or_stop(resultObject)

Arguments

resultObject

Should be a return value from an API function which uses .wrap_as_api_response internally. These are functions which are manually edited after OpenAPI autogen.

Details

For the API-level functions which use .wrap_as_api_response, manual-layer functions will receive either (a) the raw HTTP body, if the status_code was 2xx, or (b) an ApiResponse object. Using this function, callsites can get the HTTP body (if available), else an informative stop().

Value

The argument, as long as it's of type raw. Else, stops. The caller can then decode the raw body.


TileDB-Inc/TileDB-Cloud-R documentation built on July 18, 2024, 3:33 p.m.