Skip to content

Commit

Permalink
Merge pull request #571 from Sage-Bionetworks/dev-manifest-generate-e…
Browse files Browse the repository at this point in the history
…rror

Dev manifest generate error
  • Loading branch information
afwillia authored Sep 19, 2023
2 parents 0826d97 + b6425c1 commit 75c7b23
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions server.R
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ shinyServer(function(input, output, session) {
.use_annotations <- dcc_config_react()$manifest_use_annotations

promises::future_promise({
try({
switch(dca_schematic_api,
rest = manifest_generate(
url=.url,
Expand All @@ -617,14 +618,26 @@ shinyServer(function(input, output, session) {
tibble(a="b", c="d")
}
)
}, silent = TRUE)
}) %...>% manifest_data()

})

observeEvent(manifest_data(), {
if (dcc_config_react()$manifest_output_format == "google_sheet") {
shinyjs::show("div_template")
} else shinyjs::show("div_download_data")
if (inherits(manifest_data(), "try-error")) {
nx_report_error("Failed to get manifest",
tagList(
p("There was a problem downloading the manifest."),
p("Try again or contact the DCC for help"),
p("For debugging: ", manifest_data())
))
shinyjs::enable("btn_template_select")
updateTabsetPanel(session, "tab_template_select")
} else {
if (dcc_config_react()$manifest_output_format == "google_sheet") {
shinyjs::show("div_template")
} else shinyjs::show("div_download_data")
}
dcWaiter("hide")
})

Expand Down

0 comments on commit 75c7b23

Please sign in to comment.