ipfs/kubo · error

status %q is not valid

Error message

status %q is not valid

What it means

A value passed to 'ipfs pin remote ls/rm --status' is not one of the pinning service statuses (queued, pinning, pinned, failed). The raw string is cast to pinclient.Status and compared against its canonical String() output.

Source

Thrown at core/commands/pin/remotepin.go:367

		var parsedCIDs []cid.Cid
		for _, rawCID := range cidsRawArr {
			parsedCID, err := cmdutils.CidFromArg(rawCID)
			if err != nil {
				close(out)
				return fmt.Errorf("CID %q cannot be parsed: %v", rawCID, err)
			}
			parsedCIDs = append(parsedCIDs, parsedCID)
		}
		opts = append(opts, pinclient.PinOpts.FilterCIDs(parsedCIDs...))
	}
	if statusRaw, statusFound := req.Options[pinStatusOptionName]; statusFound {
		statusRawArr := statusRaw.([]string)
		var parsedStatuses []pinclient.Status
		for _, rawStatus := range statusRawArr {
			s := pinclient.Status(rawStatus)
			if s.String() == string(pinclient.StatusUnknown) {
				close(out)
				return fmt.Errorf("status %q is not valid", rawStatus)
			}
			parsedStatuses = append(parsedStatuses, s)
		}
		opts = append(opts, pinclient.PinOpts.FilterStatus(parsedStatuses...))
	}

	return c.Ls(ctx, out, opts...)
}

var rmRemotePinCmd = &cmds.Command{
	Helptext: cmds.HelpText{
		Tagline:          "Remove pins from remote pinning service.",
		ShortDescription: "Removes the remote pin, allowing it to be garbage-collected if needed.",
		LongDescription: `
Removes remote pins, allowing them to be garbage-collected if needed.

This command accepts the same search query parameters as 'ls', and it is good
practice to execute 'ls' before 'rm' to confirm the list of pins to be removed.

View on GitHub (pinned to 329838acdf)

Solutions

  1. Use only queued, pinning, pinned or failed (comma-separated for multiple)
  2. Check for typos or plurals like 'pins'
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at core/commands/pin/remotepin.go:367 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03). Data as JSON: /api/errors/d4d92517030ab400. Report an issue: GitHub.