Adding error handling around TFS queries.