I have an action button that writes a dataframe to a database, but if there is an error in writing the dataframe to the database, the app crashes. An error is returned in the R