multica-ai/multica · error
archive property: %w
Error message
archive property: %w
What it means
Returned by `multica property archive` when the PATCH sending `{"archived": true}` to `/api/properties/<id>` fails. The archive/unarchive closure (`makePropertyArchiveRun`) picks this message when `archive` is true; the wrapped error carries the real HTTP cause.
Source
Thrown at server/cmd/multica/cmd_property.go:415
client, err := newAPIClient(cmd)
if err != nil {
return err
}
ctx, cancel := cli.APIContext(context.Background())
defer cancel()
properties, err := fetchProperties(ctx, client)
if err != nil {
return err
}
property, err := resolvePropertyRef(properties, args[0])
if err != nil {
return err
}
var updated propertyDTO
if err := client.PatchJSON(ctx, "/api/properties/"+property.ID, map[string]any{"archived": archive}, &updated); err != nil {
if archive {
return fmt.Errorf("archive property: %w", err)
}
return fmt.Errorf("unarchive property: %w", err)
}
output, _ := cmd.Flags().GetString("output")
if output == "json" {
return cli.PrintJSON(os.Stdout, updated)
}
if archive {
fmt.Fprintf(os.Stdout, "Property %q archived.\n", updated.Name)
} else {
fmt.Fprintf(os.Stdout, "Property %q restored.\n", updated.Name)
}
return nil
}
}
// ---------------------------------------------------------------------------
// issue property {list|set|unset}View on GitHub (pinned to 2c0912b6ec)
Solutions
- Read the wrapped error body — a 400/422 indicates a server-side rule (e.g. cannot archive this property); adjust accordingly.
- 401/403 → refresh CLI credentials.
- Network error → verify server URL and that the backend is running, then retry.
Example fix
// before multica property archive "Priority" // error: archive property: request failed: 422 ... // after multica property archive "Priority" # after resolving the server-side constraint reported in the wrapped message
Defensive patterns
Strategy: try-catch
Validate before calling
# bash: confirm the property is currently unarchived before archiving multica property list | grep -qw "$PROP" || echo "note: $PROP may already be archived or missing"
Try / catch
if err := client.PatchJSON(ctx, path, map[string]any{"archived": true}, &updated); err != nil {
switch {
case isNotFound(err): // property gone; refresh refs
case isAuthError(err): // re-auth
default: return fmt.Errorf("archive property: %w", err)
}
} Prevention
- Re-fetch the property list before archive operations in automation.
- Respect server-side constraints surfaced in the wrapped error body.
When it happens
Trigger: Archiving a property the server refuses to archive (e.g. it is the last non-archived property, or a protected/system property), auth failure, or the server being unreachable.
Common situations: Archiving the last active property in a workspace; server-side business rules rejecting archival; expired token in long-running automation.
Related errors
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/3371d8e9384070e9.
Report an issue: GitHub.