net http request raises http errors on non successful requests