fetch pubmed ids - handle errors