Changing show index methods to single method,  added error data to catch