mm_error_body()
simply plucks the detail
list from the response body,
where Megamation's API includes informative error messages.
Examples
fake_mm_resp <- httr2::response_json(
body = list(
detail = "This is a fake detail/message from the API's response."
)
)
megamation:::mm_error_body(fake_mm_resp)
#> [1] "This is a fake detail/message from the API's response."