Skip to content

Commit

Permalink
Revert "Revert "Ant770/api error mess" (#212)"
Browse files Browse the repository at this point in the history
This reverts commit cdbb433.
  • Loading branch information
berthetclement authored Jul 4, 2023
1 parent cdbb433 commit 4d8e619
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ BUGFIXES :

* `setSimulationPathAPI` generate new global parameter `sleep` to add timer to API request
* Correction of `.importOutput()` to use `readAntares()` with `parallel == TRUE` in shiny application
* `setSimulationPathAPI()` delete a redundant API request

DATA :

Expand Down
6 changes: 3 additions & 3 deletions R/API-methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ api_get <- function(opts, endpoint, ..., default_endpoint = "v1/studies") {
if(condition_status_check){
mess_error <- content(result)
mess_error <- paste0("\n[description] : ", mess_error$description,
"\n[IniReaderError] : ", mess_error$exception)
"\n[IniReaderError]", mess_error$exception)

Check warning on line 61 in R/API-methods.R

View check run for this annotation

Codecov / codecov/patch

R/API-methods.R#L61

Added line #L61 was not covered by tests
stop_for_status(result, task = mess_error)
}else
warn_for_status(result)
}else
warn_for_status(result)

Check warning on line 64 in R/API-methods.R

View check run for this annotation

Codecov / codecov/patch

R/API-methods.R#L64

Added line #L64 was not covered by tests
content(result)
}

Expand Down
4 changes: 1 addition & 3 deletions R/utils_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,8 @@ read_secure_json <- function(url, token = NULL, timeout = 60, config = list()) {

}, allLinks, names(allLinks)))


# info <- read_secure_json(studyPath, ...)

antaresVersion <- paths$version
params <- read_secure_json(file.path(studyPath, "settings", "generaldata"), ...)

Expand Down Expand Up @@ -398,7 +397,6 @@ setSimulationPathAPI <- function(host, study_id, token, simulation = NULL,
res$httr_config <- httr_config
res$modeAPI <- "sync"


# delete version to keep only "antares_version"
res$version <- NULL

Expand Down

0 comments on commit 4d8e619

Please sign in to comment.