Add client-side error logging.