multica-ai/multica · error
delete autopilot
Error message
delete autopilot: %w
What it means
CLI error in runAutopilotDelete: the DELETE /api/autopilots/{id} request failed — most often the autopilot was already deleted or the user lacks permission. Wrapped with 'delete autopilot: %w'; on success the CLI prints the deletion confirmation.
Solutions
- Verify the autopilot exists and you have permission to delete it.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at server/cmd/multica/cmd_autopilot.go:450 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/a098dd661638ff8b.
Report an issue: GitHub.
Appendix: source
Thrown at server/cmd/multica/cmd_autopilot.go:450
return nil
}
func runAutopilotDelete(cmd *cobra.Command, args []string) error {
client, err := newAPIClient(cmd)
if err != nil {
return err
}
ctx, cancel := cli.APIContext(context.Background())
defer cancel()
autopilotRef, err := resolveAutopilotID(ctx, client, args[0])
if err != nil {
return fmt.Errorf("resolve autopilot: %w", err)
}
if err := client.DeleteJSON(ctx, "/api/autopilots/"+autopilotRef.ID); err != nil {
return fmt.Errorf("delete autopilot: %w", err)
}
fmt.Printf("Autopilot %s deleted.\n", autopilotRef.Display)
return nil
}
func runAutopilotTrigger(cmd *cobra.Command, args []string) error {
client, err := newAPIClient(cmd)
if err != nil {
return err
}
ctx, cancel := context.WithTimeout(context.Background(), cli.AtLeastAPITimeout(30*time.Second))
defer cancel()
autopilotRef, err := resolveAutopilotID(ctx, client, args[0])
if err != nil {
return fmt.Errorf("resolve autopilot: %w", err)
}View on GitHub (pinned to 2c0912b6ec)