throw custom exception on unexpected http error