It's not specified.
D&D 5th edition's Mordenkainen's Tome of Foes is the first sourcebook to reveal that the Ruby Rod was forced upon Asmodeus by Primus, and that devils obey their contracts out of fear of the rod's curse. It's not specified in any other 5th edition book, and the relevant sourcebooks of earlier editions make no mention of this curse either.
D&D 3rd edition's Fiendish Codex II: Tyrants of the Nine Hells defines Asmodeus, the Ruby Rod, and the rules around mortals making a pact with a creature. On page 23, regarding Faustian Pacts:
Though benefits of extraordinary value can be offered in a Faustian pact, the devil preparing it always tries to achieve the deal with a minimum possible expenditure of resources. Once the soul is securely damned, the negotiator often arranges—usually through servitors—to bring about the signatory's untimely death.
Page 25 describes what happens if a soul goes to Baator and demands the right to adjudication on the grounds that their rewards were not granted, or that the mortal was coerced or magically compelled:
The judge, usually a pit fiend, listens dispassionately to both sides and rules, as a lawful creature must, according to the law.
If the mortal wins, their soul goes free and may be restored to life with raise dead as normal. Notably, there's no mention of any curse or penalty which affects the devil who made the pact.
Asmodeus and his Ruby Rod are detailed in this book (p.155-157). There's no mention here of the rod's origin with Primus.
In AD&D 2nd edition's Planes of Law, it's suggested that devils obey their contracts because they are experts at creating and exploiting loopholes in contracts, so the contract is always in the devil's favour (p.20):
They'll cut a deal with any berk they can, and woe to the sod who agrees to their terms — and dire woe to any sod who thinks he can skirt the agreement! The baatezu've been making deals since before most Prime worlds cooled from the heat of creation; they've learned just about all the loopholes.