Skip to content

Commit

Permalink
fix: do not retry when server responds with a valid error
Browse files Browse the repository at this point in the history
  • Loading branch information
ymarcon committed Dec 22, 2023
1 parent fb8a340 commit a364d80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/opal.R
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ opal.version_compare <- function(opal, version) {
opal.get <- function(opal, ..., query = list(), acceptType = 'application/json', outFile = NULL, callback = NULL) {
r <- NULL
if (is.null(outFile))
r <- RETRY('GET', .url(opal, ...), query = query, accept(acceptType), config = opal$config, handle = opal$handle, .verbose())
r <- RETRY('GET', .url(opal, ...), query = query, accept(acceptType), config = opal$config, handle = opal$handle, .verbose(), terminate_on = 400:599)
else
r <- RETRY('GET', .url(opal, ...), query = query, accept(acceptType), write_disk(outFile, overwrite = TRUE), config = opal$config, handle = opal$handle, .verbose())
r <- RETRY('GET', .url(opal, ...), query = query, accept(acceptType), write_disk(outFile, overwrite = TRUE), config = opal$config, handle = opal$handle, .verbose(), terminate_on = 400:599)
.handleResponseOrCallback(opal, r, callback)
}

Expand Down

0 comments on commit a364d80

Please sign in to comment.