sc_last_error {STATcubeR}R Documentation

Error handling for the STATcube REST API

Description

In case API requests are unsuccessful, STATcubeR will throw errors to summarize the httr error type and its meaning. Requests are considered unsuccessful if one of the following applies

In some cases it is useful to get direct access to a faulty response object. For that purpose, it is possible to use sc_last_error() which will provide the httr response object for the last unsuccessful request.

Usage

sc_last_error()

sc_last_error_parsed()

Value

The return value from httr::GET() or httr::POST().

Functions

Examples


try(sc_table_saved("invalid_id"))
last_error <- sc_last_error()
httr::content(last_error)
str(sc_last_error_parsed())


[Package STATcubeR version 1.0.0 Index]