fixed error return for some failed http requests