added error handling for client who connects to an invalid table and closes the browser