Fix behavior if an http request fails