{"record":{"id":"05ae1a27fd697ddb","repo":"argoproj/argo-workflows","slug":"failed-to-update-sync-limit-w","errorCode":null,"errorMessage":"failed to update sync limit: %w","messagePattern":"failed to update sync limit: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/argo/commands/sync/update.go","lineNumber":79,"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.UpdateSyncLimitRequest{\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.UpdateSyncLimit(ctx, req)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to update sync limit: %w\", err)\n\t}\n\n\tfmt.Printf(\"Sync limit updated\\n\")\n\tprintSyncLimit(resp.Key, resp.CmName, resp.Namespace, resp.Limit, resp.Type)\n\treturn nil\n}\n","sourceCodeStart":61,"sourceCodeEnd":86,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/cmd/argo/commands/sync/update.go#L61-L86","documentation":"UpdateSyncLimitCommand wraps any error returned by the UpdateSyncLimit gRPC call. It fires when modifying an existing sync limit fails — e.g. the key/configmap does not exist yet, an invalid limit value is supplied, or the caller lacks RBAC permission — with the underlying server error preserved via %w.","triggerScenarios":"Thrown at cmd/argo/commands/sync/update.go:79 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the limit first if it does not exist","Fix the requested limit value or key per the wrapped error"],"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"}