You want to let the cutting dry and harden before planting. Basically waiting for it to heal over, like a scab.
If you pot it before it callouses, it'll rot again. I typically leave my cuttings for 7-10 days in a windowsill to heal over before potting them.