Working with R Shiny App, and have showModal Dialogs popups in other part of App, but ensure why this doesn't pop up (it pops up very fast and closes very quickly without giving me chance to hit "dismiss"). I know i reach the execution block for the error as I see the message printed:
get_data_from_api <- function(file_name, use_local = FALSE) {
url <- paste0(BASE_API_URL, 'json_payload/', '/', file_name)
response <- get_from_api(url)
tryCatch(
{
return(content(response, as = "text", encoding = "UTF-8"))
},
error = function(e) {
message('No data in chosen Analysis.', e)
showModal(
modalDialog(
div("There is no processes data associated with this Analysis")
)
)
return(NULL)
})
}
# No data in chosen Analysis.Error in content(response, as = "text", encoding = "UTF-8"): is.response(x) is not TRUE
# But no ModalDialog!