Nothing
test_that("SAD: catches API connectivity error", {
dead_api <- \(endpoint, key, json_body) {
result::failure("Connection Error to OpenAI API", status = "Error")
}
with_stubbed_credentials({
bad <- \() {
air::howto(
"How do I get the first element of a list?",
call_api = dead_api
)
}
# Should throw a helpful error
expect_error(bad(), "Connection Error")
})
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.