Added error handling to display Error in the table