Replace ErrCampaignNotDraft with operation-specific errors
Use ErrCampaignCannotStart and ErrCampaignCannotUpdate with clear actionable messages instead of a generic draft-status sentinel wrapped in noisy fmt.Errorf chains. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
This commit is contained in:
@@ -24,5 +24,6 @@ import "errors"
|
||||
|
||||
var (
|
||||
ErrCampaignMissingSources = errors.New("cannot start campaign: no scope sources configured")
|
||||
ErrCampaignNotDraft = errors.New("campaign must be in draft status")
|
||||
ErrCampaignCannotStart = errors.New("cannot start campaign: only draft campaigns can be started")
|
||||
ErrCampaignCannotUpdate = errors.New("cannot update campaign: only draft campaigns can be updated")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user