Skip to contents

Create a reusable tidy policy that applies resp_tidy_unknown(), signaling an informative error.

Usage

tidy_policy_unknown()

Value

A list with class "nectar_tidy_policy" and elements tidy_fn and tidy_args.

Examples

tidy_policy_unknown()
#> $tidy_fn
#> function (resp, call = rlang::caller_env()) 
#> {
#>     results <- resp_body_auto(resp)
#>     .nectar_abort(c("No parser is defined for this response.", 
#>         i = "Response pieces: {names(results)}"), subclass = "unknown_response_type", 
#>         call = call)
#> }
#> <bytecode: 0x55d53f2e2498>
#> <environment: namespace:nectar>
#> 
#> $tidy_args
#> list()
#> 
#> attr(,"class")
#> [1] "nectar_tidy_policy"