CRAN Package Check Results for Maintainer ‘Aleksander Bang-Larsen <contact at aleksanderbl.dk>’

Last updated on 2025-07-21 08:50:33 CEST.

Package ERROR OK
dawaR 1 12

Package dawaR

Current CRAN status: ERROR: 1, OK: 12

Version: 0.3.0
Check: tests
Result: ERROR Running ‘testthat.R’ [24s/35s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(dawaR) ## {dawaR} provides data from the Danish Agency of Climate Data ## Terms and conditions apply. ## Read more at: https://dawadocs.dataforsyningen.dk/dok/om#vilkaar > > test_check("dawaR") Starting 2 test processes [ FAIL 33 | WARN 0 | SKIP 17 | PASS 7 ] ══ Skipped tests (17) ══════════════════════════════════════════════════════════ • On CRAN (17): 'test-1-dawa-sections.R:2:3', 'test-2-get_data-sections.R:2:3', 'test-3-get_map_data-sections.R:3:3', 'test-base_api.R:8:3', 'test-get_data.R:37:3', 'test-get_map_data-kommuner.R:2:3', 'test-get_map_data-politikredse.R:2:3', 'test-get_map_data-regioner.R:2:3', 'test-get_map_data-postnumre.R:6:3', 'test-get_map_data-vote.R:2:3', 'test-get_map_data.R:2:3', 'test-status_check.R:2:3', 'test-status_check.R:22:3', 'test-status_check.R:22:3', 'test-status_check.R:22:3', 'test-status_check.R:22:3', 'test-reverse.R:35:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-afstemningsomraader.R:3:5'): Voting reverse geocode returns information in default format ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(vote_rev(x = 12.58515, y = 55.68324)) at test-afstemningsomraader.R:3:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-afstemningsomraader.R:9:5'): Voting reverse geocode returns information as dataframe ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-afstemningsomraader.R:9:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-afstemningsomraader.R:19:5'): Voting reverse geocode returns information as list ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-afstemningsomraader.R:19:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-afstemningsomraader.R:29:5'): Afstemningsomraader autocomplete returns the right answer for 'Dok' ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(vote_ac(input = "Dok")) at test-afstemningsomraader.R:29:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-afstemningsomraader.R:35:5'): Afstemningsomraader autocomplete returns the right answer for 'Æbel' ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(vote_ac(input = "Æbel")) at test-afstemningsomraader.R:35:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-afstemningsomraader.R:41:5'): Afstemningsomraader autocomplete returns the right answer for 'Røddi' ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(vote_ac(input = "Røddi")) at test-afstemningsomraader.R:41:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-afstemningsomraader.R:47:5'): Afstemningsomraader autocomplete returns the right answer for 'brønder' ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(vote_ac(input = "brønder")) at test-afstemningsomraader.R:47:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-base_api.R:20:5'): Test regioner default ─────────────────────── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(dawa("regioner")) at test-base_api.R:20:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-base_api.R:26:5'): Test regioner no cache ────────────────────── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(dawa("regioner", cache = FALSE)) at test-base_api.R:26:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-get_data.R:3:5'): get_data() returns data and in the proper format ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-get_data.R:2:3 2. │ └─cassette$call_block(...) 3. └─dawaR::get_data("regioner") at test-get_data.R:3:5 4. └─dawaR::dawa(...) ── Error ('test-get_data.R:43:5'): get_data(section = 'kommuner') snapshot ───── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(get_data(section = "kommuner")) at test-get_data.R:43:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-get_data.R:49:5'): get_data(section = 'politikredse') snapshot ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(get_data(section = "politikredse")) at test-get_data.R:49:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-get_data.R:55:5'): get_data(section = 'regioner') snapshot ───── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(get_data(section = "regioner")) at test-get_data.R:55:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:3:5'): Autocomplete returns the right answer for regioner with input Dok ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:3:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:9:5'): Autocomplete returns the right answer for kommuner with input Dok ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:9:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:15:5'): Autocomplete returns the right answer for politikredse with input Dok ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:15:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:21:5'): Autocomplete returns the right answer for afstemningsomraader with input Dok ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:21:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:27:5'): Autocomplete returns the right answer for regioner with input Æbel ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:27:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:33:5'): Autocomplete returns the right answer for kommuner with input Æbel ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:33:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:39:5'): Autocomplete returns the right answer for politikredse with input Æbel ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:39:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:45:5'): Autocomplete returns the right answer for afstemningsomraader with input Æbel ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:45:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:51:5'): Autocomplete returns the right answer for regioner with input Røddi ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:51:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:57:5'): Autocomplete returns the right answer for kommuner with input Røddi ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:57:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:63:5'): Autocomplete returns the right answer for politikredse with input Røddi ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:63:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:69:5'): Autocomplete returns the right answer for afstemningsomraader with input Røddi ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:69:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:75:5'): Autocomplete returns the right answer for regioner with input brønder ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:75:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:81:5'): Autocomplete returns the right answer for kommuner with input brønder ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:81:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:87:5'): Autocomplete returns the right answer for politikredse with input brønder ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:87:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:93:5'): Autocomplete returns the right answer for afstemningsomraader with input brønder ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:93:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-reverse.R:3:5'): reverse geocode regioner 1 ──────────────────── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(reverse("regioner", x = 12.58515, y = 55.68324)) at test-reverse.R:3:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-reverse.R:9:5'): reverse geocode afstemningsomraader ─────────── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-reverse.R:9:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-reverse.R:18:5'): reverse geocode regioner 2 ─────────────────── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-reverse.R:18:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-reverse.R:27:5'): reverse geocode politikredse ───────────────── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-reverse.R:27:5 2. └─rlang::cnd_signal(state$error) [ FAIL 33 | WARN 0 | SKIP 17 | PASS 7 ] Error: Test failures Execution halted Flavor: r-devel-linux-x86_64-fedora-gcc