FIX: handling failed http connections