add new method for http errors