AttributeError caught on bad response