{"record":{"id":"c826fb69b3b84699","repo":"multica-ai/multica","slug":"unarchive-property-w","errorCode":null,"errorMessage":"unarchive property: %w","messagePattern":"unarchive property: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_property.go","lineNumber":417,"sourceCode":"\t\t\treturn err\n\t\t}\n\t\tctx, cancel := cli.APIContext(context.Background())\n\t\tdefer cancel()\n\n\t\tproperties, err := fetchProperties(ctx, client)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tproperty, err := resolvePropertyRef(properties, args[0])\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tvar updated propertyDTO\n\t\tif err := client.PatchJSON(ctx, \"/api/properties/\"+property.ID, map[string]any{\"archived\": archive}, &updated); err != nil {\n\t\t\tif archive {\n\t\t\t\treturn fmt.Errorf(\"archive property: %w\", err)\n\t\t\t}\n\t\t\treturn fmt.Errorf(\"unarchive property: %w\", err)\n\t\t}\n\t\toutput, _ := cmd.Flags().GetString(\"output\")\n\t\tif output == \"json\" {\n\t\t\treturn cli.PrintJSON(os.Stdout, updated)\n\t\t}\n\t\tif archive {\n\t\t\tfmt.Fprintf(os.Stdout, \"Property %q archived.\\n\", updated.Name)\n\t\t} else {\n\t\t\tfmt.Fprintf(os.Stdout, \"Property %q restored.\\n\", updated.Name)\n\t\t}\n\t\treturn nil\n\t}\n}\n\n// ---------------------------------------------------------------------------\n// issue property {list|set|unset}\n// ---------------------------------------------------------------------------\n","sourceCodeStart":399,"sourceCodeEnd":435,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_property.go#L399-L435","documentation":"Returned by `multica property unarchive` when the PATCH sending `{\"archived\": false}` to `/api/properties/<id>` fails. Same code path as archive (shared closure `makePropertyArchiveRun`), with the unarchive wording selected when `archive` is false.","triggerScenarios":"Restoring an archived property while the server rejects the request (permissions, validation), the token is invalid, or the API is unreachable.","commonSituations":"Restoring properties in scripts after server migration; the property was deleted server-side in the meantime (404); stale auth.","solutions":["Check the wrapped message: 404 means the property no longer exists (re-fetch with `multica property list --archived`); 401 → re-login.","Verify the property ref is correct and still archived.","Fix connectivity and retry if it is a network error."],"exampleFix":"// before\nmultica property unarchive \"Priority\"\n// error: unarchive property: request failed: 404 not found\n\n// after\nmultica property list --archived   # find the current ref/id\nmultica property unarchive <correct-ref>","handlingStrategy":"try-catch","validationCode":"# bash: check the archived listing first\nmultica property list --archived 2>/dev/null | grep -qw \"$PROP\" || echo \"$PROP not in archived list\"","typeGuard":null,"tryCatchPattern":"if err := client.PatchJSON(ctx, path, map[string]any{\"archived\": false}, &updated); err != nil {\n    if isNotFound(err) { /* refetch archived list, use current ID */ }\n    return fmt.Errorf(\"unarchive property: %w\", err)\n}","preventionTips":["Archive/unarchive by stable ID rather than name when scripting.","Expect 404s if the property may have been deleted server-side."],"tags":["go","cli","api","property","archive"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}