http_error_body: Error Response Body

View source: R/http.R

http_error_bodyR Documentation

Error Response Body

Description

Error Response Body

as_http_error_body() converts R condition objects to lists that plumber knows how to serialze to.

Usage

http_error_body(message, ..., class = NULL)

as_http_error_body(e)

## S3 method for class 'list'
as_http_error_body(e)

## S3 method for class 'error'
as_http_error_body(e)

## S3 method for class 'rlang_error'
as_http_error_body(e)

## S3 method for class 'httr2_http'
as_http_error_body(e)

## S3 method for class 'response'
as_http_error_body(e)

Arguments

message

character scalar. an error message

...

arbitrary R obejcts, as long as plumber knows how to serialize them

e

a condition S3 object (usually an error)

type

character scalar. Type of the error (usually class(e)[[1]])

error

character an base::errorCondition object

Value

A list of subclass http_error_body with elements error (the http), type, and message

See Also

errors


s-fleck/exceptions documentation built on May 18, 2022, 10:57 a.m.