larksuite/cli · error
remove_inline requires target with at least one of part_id o
Error message
remove_inline requires target with at least one of part_id or cid
What it means
Guard in PatchOp.Validate: a remove_inline op has no target key (part_id or cid), so the inline part to remove cannot be identified.
Source
Thrown at shortcuts/mail/draft/model.go:338
return fmt.Errorf("remove_attachment requires target with at least one of part_id, cid, or token")
}
case "add_inline":
if strings.TrimSpace(op.Path) == "" {
return fmt.Errorf("add_inline requires path")
}
if strings.TrimSpace(op.CID) == "" {
return fmt.Errorf("add_inline requires cid")
}
case "replace_inline":
if !op.Target.hasKey() {
return fmt.Errorf("replace_inline requires target with at least one of part_id or cid")
}
if strings.TrimSpace(op.Path) == "" {
return fmt.Errorf("replace_inline requires path")
}
case "remove_inline":
if !op.Target.hasKey() {
return fmt.Errorf("remove_inline requires target with at least one of part_id or cid")
}
case "insert_signature":
if strings.TrimSpace(op.SignatureID) == "" {
return fmt.Errorf("insert_signature requires signature_id")
}
case "remove_signature":
// No required fields.
case "set_calendar":
if strings.TrimSpace(op.EventSummary) == "" {
return fmt.Errorf("set_calendar requires event_summary")
}
if strings.TrimSpace(op.EventStart) == "" || strings.TrimSpace(op.EventEnd) == "" {
return fmt.Errorf("set_calendar requires event_start and event_end")
}
start, err := parseISO8601(op.EventStart)
if err != nil {
return fmt.Errorf("set_calendar: event_start must be a valid ISO 8601 timestamp")
}View on GitHub (pinned to 7fd6ef3c07)
Solutions
- Set target.part_id or target.cid
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at shortcuts/mail/draft/model.go:338 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of larksuite/cli@7fd6ef3c07 (2026-09-04).
Data as JSON: /api/errors/68e54b523d9d5daf.
Report an issue: GitHub.