{"record":{"id":"5fd55b53917dbbff","repo":"ipfs/kubo","slug":"unexpected-argument-q","errorCode":null,"errorMessage":"unexpected argument %q","messagePattern":"unexpected argument %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/commands/pin/remotepin.go","lineNumber":423,"sourceCode":"\t},\n\n\tArguments: []cmds.Argument{},\n\tOptions: []cmds.Option{\n\t\tpinServiceNameOption,\n\t\tcmds.StringOption(pinNameOptionName, \"Remove pins with names that contain provided value (case-sensitive, exact match).\"),\n\t\tcmds.DelimitedStringsOption(\",\", pinCIDsOptionName, \"Remove pins for the specified CIDs.\"),\n\t\tcmds.DelimitedStringsOption(\",\", pinStatusOptionName, \"Remove pins with the specified statuses (queued,pinning,pinned,failed).\").WithDefault([]string{\"pinned\"}),\n\t\tcmds.BoolOption(pinForceOptionName, \"Allow removal of multiple pins matching the query without additional confirmation.\").WithDefault(false),\n\t},\n\tRun: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {\n\t\tc, err := getRemotePinServiceFromRequest(req, env)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\trmIDs := []string{}\n\t\tif len(req.Arguments) != 0 {\n\t\t\treturn fmt.Errorf(\"unexpected argument %q\", req.Arguments[0])\n\t\t}\n\n\t\tpsCh := make(chan pinclient.PinStatusGetter)\n\t\terrCh := make(chan error, 1)\n\t\tctx, cancel := context.WithCancel(req.Context)\n\t\tdefer cancel()\n\n\t\tgo func() {\n\t\t\terrCh <- lsRemote(ctx, req, c, psCh)\n\t\t}()\n\t\tfor ps := range psCh {\n\t\t\trmIDs = append(rmIDs, ps.GetRequestId())\n\t\t}\n\t\tif err = <-errCh; err != nil {\n\t\t\treturn fmt.Errorf(\"error while listing remote pins: %v\", err)\n\t\t}\n\n\t\tif len(rmIDs) > 1 && !req.Options[pinForceOptionName].(bool) {","sourceCodeStart":405,"sourceCodeEnd":441,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/commands/pin/remotepin.go#L405-L441","documentation":"Fired by `ipfs pin remote rm` when a positional argument is given to the command. The command accepts no positional arguments (Arguments: []cmds.Argument{}), so this generic guard rejects any extra argument before processing.","triggerScenarios":"Thrown at core/commands/pin/remotepin.go:423 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the positional argument and express the target as an option, e.g. 'ipfs pin remote rm --service s --requestid <id>'","See 'ipfs pin remote rm --help' for the supported filter options"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}