Skip to content

Commit 75c7b23

Browse files
authored
Merge pull request #571 from Sage-Bionetworks/dev-manifest-generate-error
Dev manifest generate error
2 parents 0826d97 + b6425c1 commit 75c7b23

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

server.R

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,7 @@ shinyServer(function(input, output, session) {
598598
.use_annotations <- dcc_config_react()$manifest_use_annotations
599599

600600
promises::future_promise({
601+
try({
601602
switch(dca_schematic_api,
602603
rest = manifest_generate(
603604
url=.url,
@@ -617,14 +618,26 @@ shinyServer(function(input, output, session) {
617618
tibble(a="b", c="d")
618619
}
619620
)
621+
}, silent = TRUE)
620622
}) %...>% manifest_data()
621623

622624
})
623625

624626
observeEvent(manifest_data(), {
625-
if (dcc_config_react()$manifest_output_format == "google_sheet") {
626-
shinyjs::show("div_template")
627-
} else shinyjs::show("div_download_data")
627+
if (inherits(manifest_data(), "try-error")) {
628+
nx_report_error("Failed to get manifest",
629+
tagList(
630+
p("There was a problem downloading the manifest."),
631+
p("Try again or contact the DCC for help"),
632+
p("For debugging: ", manifest_data())
633+
))
634+
shinyjs::enable("btn_template_select")
635+
updateTabsetPanel(session, "tab_template_select")
636+
} else {
637+
if (dcc_config_react()$manifest_output_format == "google_sheet") {
638+
shinyjs::show("div_template")
639+
} else shinyjs::show("div_download_data")
640+
}
628641
dcWaiter("hide")
629642
})
630643

0 commit comments

Comments
 (0)