Fix return value for permanent http errors