New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RS-3782 save load to datamart blob #1
Conversation
R/DataMart.R
Outdated
|
||
res <- try(POST(paste0(url, "?filename=", filename), | ||
companySecret <- ifelse(exists("companySecret"), companySecret, "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ifelse()
is not great for a few reasons. you can replace this with companySecret <- get0("companySecret", ifnotfound = "")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
close.qpostconn
and QSaveData
should end with calls to invisible()
and their @return
should say they are called for their side effect and return NULL
invisibly.
It also might be nice if the error message for those functions when the POST
call fails, included more information such as the http error code.
I've added the http status code, but since there is no response content and the error message is in the status text, I think this is the best I can do ... |
…d added http status code to errors
There are 2 warnings showing up when checking, but both relate to close.qpostconn parameters (documentation/consistency) but I don't think it's important?