Skip to content

Commit

Permalink
Improve handling of errors during notebook creation.
Browse files Browse the repository at this point in the history
  • Loading branch information
useless5771 committed Aug 21, 2018
1 parent 65fa871 commit c53651b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions rcloud.support/R/rcloud.support.R
Expand Up @@ -376,9 +376,17 @@ rcloud.create.notebook <- function(content, is.current = TRUE) {
}
}
res <- rcloud.augment.notebook(res)
ulog("INFO: rcloud.create.notebook (", res$content$id, ")")
if(res$ok) {
ulog("INFO: rcloud.create.notebook (", res$content$id, ")")
} else {
if('code' %in% names(res)) {
ulog("ERROR: rcloud.create.notebook failed (", res$code, ")")
} else {
ulog("ERROR: rcloud.create.notebook failed")
}
}
res
}, error = function(e) { list(ok = FALSE) })
}, error = function(e) { list(ok = FALSE, content = list (message = as.character(e))) })
}

rcloud.rename.notebook <- function(id, new.name) {
Expand Down

0 comments on commit c53651b

Please sign in to comment.