support for detecting http errors