fix stackoverflow on Http error