Copy SQL messages to R shiny show notifications

Hi all,

I have incorporated trycatch to my code so that when the error message shows in SQl , my app does not crash. But is there a way to replicate the error message that we get in SQL to R shiny show notification

below is the sample of the code

if(input$ID != "" && !is.null(input$Date)){

      # to get data from SQL
      tryCatch({
      # to get data from SQL
      sql <- paste0("SELECT * FROM [SSS].[AAA].[CCC]")
      df1 <- sqlQuery(db, sql, error = FALSE)   # db is already declared
        },

      error = function(err){
        showNotification(paste0(err), type = 'err')
      })

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.