escape HTTPError, pmcid check and exception handling