{"record":{"id":"ef02177734679736","repo":"windmill-labs/windmill","slug":"invalid-settings-format-expected-include-type-arr-ef0217","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/push.ts","lineNumber":83,"sourceCode":"    let settings: any;\n    if (opts.withBackendSettings) {\n      try {\n        const parsedSettings = JSON.parse(opts.withBackendSettings);\n\n        // Validate the structure matches expected test 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":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/gitsync-settings/push.ts#L65-L101","documentation":"Follow-up check in the push command's --with-backend-settings validation: include_path was a valid array, but include_type is missing or not an array. The input at fault is the flag's JSON; the push validates both fields because it forwards the object as the workspace git-sync configuration.","triggerScenarios":"Thrown at cli/src/commands/gitsync-settings/push.ts:83 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add include_type as an array of asset-kind strings to the JSON","Pass the backend settings object unchanged rather than a hand-trimmed copy","Run without --with-backend-settings to use the stored settings"],"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"}