{"record":{"id":"bc779decd961d36c","repo":"hasura/graphql-engine","slug":"error-in-getting-server-feature-flags-w","errorCode":null,"errorMessage":"error in getting server feature flags %w","messagePattern":"error in getting server feature flags %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/cli.go","lineNumber":726,"sourceCode":"\t\t\t\"2) Endpoint should NOT be your GraphQL API, ie endpoint is NOT https://hasura-cloud-app.io/v1/graphql it should be: https://hasura-cloud-app.io\",\n\t\t)\n\t\tec.Logger.Info(\"3) Server might be unhealthy and is not running/accepting API requests\")\n\t\tec.Logger.Info(\"4) Admin secret is not correct/set\")\n\t\tec.Logger.Infoln()\n\n\t\treturn errors.E(op, err)\n\t}\n\n\t// get version from the server and match with the cli version\n\terr = ec.checkServerVersion()\n\tif err != nil {\n\t\treturn errors.E(op, fmt.Errorf(\"version check: %w\", err))\n\t}\n\n\t// get the server feature flags\n\terr = ec.Version.GetServerFeatureFlags()\n\tif err != nil {\n\t\treturn errors.E(op, fmt.Errorf(\"error in getting server feature flags %w\", err))\n\t}\n\n\tec.AddRequestHeaders(\n\t\tmap[string]string{GetAdminSecretHeaderName(ec.Version): ec.Config.GetAdminSecret()},\n\t)\n\n\tec.Config.HTTPClient.SetHeaders(ec.requestHeaders)\n\n\t// this populates the ec.Config.ServerConfig.HasuraServerInternalConfig\n\terr = ec.Config.GetHasuraInternalServerConfig(httpClient)\n\tif err != nil {\n\t\t// If config API is not enabled log it and don't fail\n\t\tec.Logger.Debugf(\n\t\t\t\"cannot get config information from server, this might be because config API is not enabled: %v\",\n\t\t\terr,\n\t\t)\n\t}\n","sourceCodeStart":708,"sourceCodeEnd":744,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/cli.go#L708-L744","documentation":"More than one permissions definition was supplied for the same command. Each command may have at most one permissions entry, so the resolver rejects duplicates.","triggerScenarios":"Defining two command permission blocks referencing the same Qualified<CommandName> in the metadata.","commonSituations":"Copy-pasting a permissions block for a second role without changing the command; merging metadata from multiple sources that both configure the same command; appending instead of editing during automated metadata generation.","solutions":["Locate all command permissions entries for the named command and merge/remove duplicates","Keep a single entry and express role rules within it if the format supports it","Re-run metadata resolution"],"exampleFix":"// before\ncommand_permissions:\n  - command: create_post\n    role: admin\n  - command: create_post\n    role: user\n// after\n// merge into the single permissions structure supported for the command","handlingStrategy":"validation","validationCode":"let dupes: Vec<_> = command_permissions.iter().map(|p| p.command.as_str()).duplicates().collect();\nassert!(dupes.is_empty(), \"duplicate command permissions: {dupes:?}\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep one permissions block per command; use code-gen instead of manual duplication","Run duplicate-detection on permissions in CI"],"tags":["metadata","permissions","commands","duplicate"],"backgroundTag":"duplicate-metadata-definition","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}