Add exception handling to database_notification