diff --git a/R/API-methods.R b/R/API-methods.R index 3af92dac..dda191de 100644 --- a/R/API-methods.R +++ b/R/API-methods.R @@ -172,6 +172,12 @@ api_delete <- function(opts, endpoint, ..., default_endpoint = "v1/studies") { config = config, ... ) - stop_for_status(result) + api_content <- content(result) + if(!is.null(names(api_content))) + api_content <- paste0("\n[Description] : ", api_content$description, + "\n[Exception] : ", api_content$exception) + else + api_content <- NULL + stop_for_status(result, task = api_content) content(result) }