multica-ai/multica · error

update runtime profile

Error message

update runtime profile: %w

What it means

Wraps the error from client.PatchJSON in runRuntimeProfileUpdate when PATCHing the runtime profile fails. Fires after local flag assembly (only changed fields are sent) on transport, auth, or server rejection; the cause is wrapped.

Solutions

  1. Check the server response for details and retry the update.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at server/cmd/multica/cmd_runtime_profile.go:250 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/fa9ed47588a611fd. Report an issue: GitHub.

Appendix: source

Thrown at server/cmd/multica/cmd_runtime_profile.go:250

		return fmt.Errorf("no fields to update: pass at least one of --display-name, --command-name, --description, --enabled")
	}

	client, err := newAPIClient(cmd)
	if err != nil {
		return err
	}
	workspaceID, err := requireWorkspaceID(cmd)
	if err != nil {
		return err
	}

	ctx, cancel := cli.APIContext(context.Background())
	defer cancel()

	path := runtimeProfilesPath(workspaceID) + "/" + profileID
	var profile map[string]any
	if err := client.PatchJSON(ctx, path, body, &profile); err != nil {
		return fmt.Errorf("update runtime profile: %w", err)
	}
	return outputRuntimeProfile(cmd, profile)
}

func runRuntimeProfileDelete(cmd *cobra.Command, args []string) error {
	profileID := args[0]

	client, err := newAPIClient(cmd)
	if err != nil {
		return err
	}
	workspaceID, err := requireWorkspaceID(cmd)
	if err != nil {
		return err
	}

	ctx, cancel := cli.APIContext(context.Background())
	defer cancel()

View on GitHub (pinned to 2c0912b6ec)