{"record":{"id":"67e8b07f42b0cb8e","repo":"windmill-labs/windmill","slug":"invalid-settings-format-expected-include-type-arr","errorCode":null,"errorMessage":"Invalid settings format. Expected include_type array","messagePattern":"Invalid settings format\\. Expected include_type array","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/src/commands/gitsync-settings/pull.ts","lineNumber":64,"sourceCode":"    let settings: any;\n    if (opts.withBackendSettings) {\n      try {\n        const parsedSettings = JSON.parse(opts.withBackendSettings);\n\n        // Validate the structure matches expected format (raw settings object)\n        if (\n          !parsedSettings.include_path ||\n          !Array.isArray(parsedSettings.include_path)\n        ) {\n          throw new Error(\n            \"Invalid settings format. Expected include_path array\",\n          );\n        }\n        if (\n          !parsedSettings.include_type ||\n          !Array.isArray(parsedSettings.include_type)\n        ) {\n          throw new Error(\n            \"Invalid settings format. Expected include_type array\",\n          );\n        }\n\n        // Create mock backend response with single repository using provided settings\n        const mockRepositoryPath = opts.repository || \"u/mock/repo\";\n        settings = {\n          git_sync: {\n            repositories: [{\n              git_repo_resource_path: mockRepositoryPath,\n              settings: {\n                include_path: parsedSettings.include_path,\n                include_type: parsedSettings.include_type,\n                exclude_path: parsedSettings.exclude_path || [],\n                extra_include_path: parsedSettings.extra_include_path || [],\n              },\n            }],\n          },","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/gitsync-settings/pull.ts#L46-L82","documentation":"Second schema check on --with-backend-settings in the git-sync pull command: include_path passed validation as an array, but include_type is missing or not an array. Same raw-settings contract — the backend object carries both include_path and include_type arrays; the faulting input is the flag's JSON with a missing/mistyped include_type.","triggerScenarios":"Thrown at cli/src/commands/gitsync-settings/pull.ts:64 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include include_type as an array in the JSON, e.g. \\\"include_type\\\": [\\\"script\\\",\\\"flow\\\",\\\"folder\\\",\\\"app\\\"]","Copy the whole settings object from the backend unchanged rather than hand-writing a partial one","Drop --with-backend-settings and let the command pull settings from the server"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}