{"record":{"id":"8e8881881c6019af","repo":"argoproj/argo-workflows","slug":"failed-to-create-sync-limit-w","errorCode":null,"errorMessage":"failed to create sync limit: %w","messagePattern":"failed to create sync limit: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/argo/commands/sync/create.go","lineNumber":80,"sourceCode":"\tif err != nil {\n\t\treturn err\n\t}\n\tserviceClient, err := apiClient.NewSyncServiceClient(ctx)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treq := &syncpkg.CreateSyncLimitRequest{\n\t\tCmName:    cliOpts.cmName,\n\t\tNamespace: client.Namespace(ctx),\n\t\tKey:       key,\n\t\tLimit:     cliOpts.limit,\n\t\tType:      syncpkg.SyncConfigType(syncpkg.SyncConfigType_value[cliOpts.syncType]),\n\t}\n\n\tresp, err := serviceClient.CreateSyncLimit(ctx, req)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to create sync limit: %w\", err)\n\t}\n\n\tfmt.Printf(\"Sync limit created\\n\")\n\tprintSyncLimit(resp.Key, resp.CmName, resp.Namespace, resp.Limit, resp.Type)\n\n\treturn nil\n}\n","sourceCodeStart":62,"sourceCodeEnd":88,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/cmd/argo/commands/sync/create.go#L62-L88","documentation":"CreateSyncLimitCommand wraps any error returned by the CreateSyncLimit gRPC call that persists a new semaphore/parallelism limit in the chosen configmap or database. It fires when the server rejects creation — e.g. invalid limit key, configmap not writable, RBAC denial, or a malformed sync type — preserving the server-side cause via %w.","triggerScenarios":"Thrown at cmd/argo/commands/sync/create.go:80 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the wrapped error for the server-side reason","Ensure --type and --cm-name flags pass validation and the configmap exists"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35bff19146f5a6ada77468c431f2624bd577e373","analyzedAt":"2026-09-03T19:34:35.908Z","contentChangedAt":"2026-09-03T19:34:35.908Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}