diff --git a/DESCRIPTION b/DESCRIPTION index 6f4eead..dd0d2f4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: sasctl Title: The sasctl package enables easy communication between the SAS Viya platform APIs and the R runtime -Version: 0.7.2 +Version: 0.7.3 Author: Eduardo Hellas Authors@R: c( person(given = "Eduardo", diff --git a/NEWS.md b/NEWS.md index e8794be..e6b79f2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +# sasctl 0.7.3 + +* Fixed `publish_model` exact argument +* Added SAS log to error message when `publish_model` fails. + # sasctl 0.7.2 * Fixed when registering models with variables missing label/measurement metadata diff --git a/R/model_management.R b/R/model_management.R index 29eb4c3..29600c6 100644 --- a/R/model_management.R +++ b/R/model_management.R @@ -43,7 +43,7 @@ publish_model <- function(session, model, name, name = model[["name"]] , notes = "Published from RSasclt", # model$description, modelContents = list(list(modelName = name, - sourceUri = model$links[model$links$rel == "self",]$uri, + sourceUri = model$links[model$links$rel == "self",][["uri"]], publishLevel = "model")), destinationName = destination ) @@ -63,7 +63,7 @@ publish_model <- function(session, model, name, Sys.sleep(1) - publish <- vGET(session, publish$links[publish$links$rel == "self",]$uri, + publish <- vGET(session, publish$links[publish$links$rel == "self",][["uri"]], ...) } @@ -76,7 +76,10 @@ publish_model <- function(session, model, name, } if (publish$state == "failed") { - stop("The model publication failed") + logmsg <- vGET(session, publish$links[publish$links$rel == + "publishingLog", ][["uri"]])[["log"]] + + stop(paste("The model publication failed with log:", logmsg)) }