{"record":{"id":"027823ec0f23c880","repo":"multica-ai/multica","slug":"unset-property-w","errorCode":null,"errorMessage":"unset property: %w","messagePattern":"unset property: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_property.go","lineNumber":686,"sourceCode":"\tctx, cancel := cli.APIContext(context.Background())\n\tdefer cancel()\n\n\tissueRef, err := resolveIssueRef(ctx, client, args[0])\n\tif err != nil {\n\t\treturn fmt.Errorf(\"resolve issue: %w\", err)\n\t}\n\tproperties, err := fetchProperties(ctx, client)\n\tif err != nil {\n\t\treturn err\n\t}\n\tproperty, err := resolvePropertyRef(properties, name)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tpath := \"/api/issues/\" + issueRef.ID + \"/properties/\" + property.ID\n\tif err := client.DeleteJSON(ctx, path); err != nil {\n\t\treturn fmt.Errorf(\"unset property: %w\", err)\n\t}\n\toutput, _ := cmd.Flags().GetString(\"output\")\n\tif output == \"json\" {\n\t\treturn cli.PrintJSON(os.Stdout, map[string]any{\"deleted\": true})\n\t}\n\tfmt.Fprintf(os.Stdout, \"Property %q unset.\\n\", property.Name)\n\treturn nil\n}\n","sourceCodeStart":668,"sourceCodeEnd":695,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_property.go#L668-L695","documentation":"Returned by `runIssuePropertyUnset` when the DELETE to `/api/issues/<issueID>/properties/<propertyID>` fails. Both refs were already resolved locally, so the wrapped error reflects server-side rejection or transport failure.","triggerScenarios":"Server refuses the delete (permissions, protected property, or the property value/definition vanished server-side returning 404/409), expired token, or connectivity loss.","commonSituations":"Property deleted concurrently by another client; role lacks edit permission on the issue; automation running against a restarted server.","solutions":["Parse the wrapped status: 404 → the property or issue changed server-side, re-fetch lists and retry with fresh IDs.","401/403 → refresh credentials or check permissions.","Network failure → confirm server health and retry."],"exampleFix":"// before\nmultica issue property unset ISS-1 --name Priority\n// error: unset property: request failed: 404 ...\n\n// after\nmultica property list && multica issue list   # refresh refs\nmultica issue property unset <issue-key> --name <current-property-name>","handlingStrategy":"try-catch","validationCode":"# bash: confirm both refs are current before the delete\nmultica issue list | grep -qw \"$ISSUE\" && multica property list | grep -qw \"$PROP\" || { echo 'stale ref' >&2; exit 1; }","typeGuard":null,"tryCatchPattern":"if err := client.DeleteJSON(ctx, path); err != nil {\n    if isNotFound(err) { /* treat as success or refresh refs */ }\n    if isAuthError(err) { reauth(); retry once }\n    return fmt.Errorf(\"unset property: %w\", err)\n}","preventionTips":["Tolerate 404 on unset — the property may already be gone, which is the desired end state.","Re-fetch issue/property IDs when operating on data that can change concurrently."],"tags":["go","cli","api","issue","property","network"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}