add alertType: error and warning