if not res then there isn't res.code