multica-ai/multica · error
get metadata
Error message
get metadata: %w
What it means
Wrapped transport/API failure in runIssueMetadataGet: the GET to fetch the issue's full metadata map failed (auth, server error, or network) before the requested key could be looked up. The %w keeps the underlying HTTP error attached; note this fetches all metadata and selects the key client-side, so the same call backs both get and list.
Solutions
- Check server connectivity and retry fetching the metadata value.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at server/cmd/multica/cmd_issue_metadata.go:233 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/576664024c5edb66.
Report an issue: GitHub.
Appendix: source
Thrown at server/cmd/multica/cmd_issue_metadata.go:233
if key == "" {
return fmt.Errorf("--key is required")
}
client, err := newAPIClient(cmd)
if err != nil {
return err
}
ctx, cancel := cli.APIContext(context.Background())
defer cancel()
issueRef, err := resolveIssueRef(ctx, client, args[0])
if err != nil {
return fmt.Errorf("resolve issue: %w", err)
}
var result map[string]any
if err := client.GetJSON(ctx, "/api/issues/"+issueRef.ID+"/metadata", &result); err != nil {
return fmt.Errorf("get metadata: %w", err)
}
metadata, _ := result["metadata"].(map[string]any)
value, present := metadata[key]
if !present {
return fmt.Errorf("key %q not found on issue", key)
}
output, _ := cmd.Flags().GetString("output")
if output == "json" {
return cli.PrintJSON(os.Stdout, value)
}
headers := []string{"KEY", "VALUE", "TYPE"}
rows := [][]string{{key, formatMetadataValue(value), metadataValueType(value)}}
cli.PrintTable(os.Stdout, headers, rows)
return nil
}
func runIssueMetadataSet(cmd *cobra.Command, args []string) error {View on GitHub (pinned to 2c0912b6ec)