MT-22401: correct the campaign delete precondition to draft-only - #52
MT-22401: correct the campaign delete precondition to draft-only#52Rabsztok wants to merge 1 commit into
Conversation
Decisions: - The backend allows deleting only a campaign in the draft state, not merely a non-sending one, so the previous wording understated the constraint - Mirror the update operation's phrasing, which already documents the same rule - Point at cancel/reset as the way back to draft from scheduled; a started campaign has no path back and can no longer be deleted
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe delete campaign endpoint documentation now restricts deletion to ChangesCampaign deletion documentation
Estimated code review effort: 2 (Simple) | ~5 minutes Mergeability Score: ⚪ Minimal · up to This localized documentation correction introduces no actionable merge-blocking risk; the PR is merge-ready after normal specification checks. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Motivation
MT-22401
The
deleteEmailCampaigndescription says the campaign "must not be in a sending state", which is weaker than what the API enforces: only a campaign in thedraftstate can be deleted. Anything else returns422.This spec is the source of truth the SDKs are documented against, so the inaccurate wording was copied verbatim into all nine of them (and into example scripts that deleted a campaign after starting it, which would 422). Those are being corrected in the SDK PRs; this fixes the source.
Changes
updateEmailCampaignoperation already uses for the same rulecancel/resetreturn ascheduledcampaign todraft, and that a started campaign has no path back and can no longer be deletedHow to test
draftcampaigns can be deletedSummary by CodeRabbit