Error while shiny app loads for first time only

I have a shiny app which give me this error when it loads the first time

Warning: Error in : Can't show last error because no error was recorded yet
Call `rlang::last_error()` to see a backtrace
  51: <Anonymous>
Error : Can't show last error because no error was recorded yet

But when I rerun the app via rstudio or refresh the page for the live app it works. Am unable to present a reproducible example here but what are the things I can look into for debug. I did add the rlang::last_error() but still can seem to get any more description of the error.

Thank you.