Hi Klara --
You have code structured like
out <- tryCatch({
response = httr::GET(url)
...
}, error = function(cond) {
...
... htr::http_status(response)$message
})
so if GET() fails, response is undefined; I guess this is what happened,
the "why" is a mystery but could be as simple as transient internet
connectivity.
It seems like you could instead report conditionMessage(cond) in the
error function (catching the GET() error), and use
httr::stop_for_status() to check for invalid status response from the
server.
FWIW your code in utils.R is not consistently indented (sometimes tabs,
sometimes spaces); I'd strongly suggest 4 spaces and no tabs. Also
message(paste(...)) can usually be represented simply as message(...,
including multiline messages.
Martin
On 04/15/2018 12:25 PM, Klara Kaleb wrote:
Hi Bioc team,
I am one of the maintainers the roma package in the devel version. The package
is building fine on mac and linux, however I am experience an error on tokay2
that I have been so far unable to solve. The problem seems to be in receiving
the responses from the API. which fails in the first vignette with the
following error message:
"
Error: processing vignette 'exploring_hogs.Rmd' failed with diagnostics:
object 'response' not found
"
I have checked the relevant end point and it works as it is suppose to do.
Furthermore, the same error does not show up in mac and linux servers. Would
you happen to have any pointers to what might be causing this error?
Thank you in advance,
Klara
[[alternative HTML version deleted]]
_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel
This email message may contain legally privileged and/or...{{dropped:2}}
_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel