{"id":"4ab23e5b47aa0662","repo":"docker/cli","slug":"invalid-type-t-for-healthcheck-test","errorCode":null,"errorMessage":"invalid type %T for healthcheck.test","messagePattern":"invalid type %T for healthcheck\\.test","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/compose/loader/loader.go","lineNumber":892,"sourceCode":"\t}\n\tpanic(fmt.Errorf(\"expected a map or a list, got %T: %#v\", mappingOrList, mappingOrList))\n}\n\nvar transformShellCommand TransformerFunc = func(value any) (any, error) {\n\tif str, ok := value.(string); ok {\n\t\treturn shlex.Split(str)\n\t}\n\treturn value, nil\n}\n\nvar transformHealthCheckTest TransformerFunc = func(data any) (any, error) {\n\tswitch value := data.(type) {\n\tcase string:\n\t\treturn append([]string{\"CMD-SHELL\"}, value), nil\n\tcase []any:\n\t\treturn value, nil\n\tdefault:\n\t\treturn value, fmt.Errorf(\"invalid type %T for healthcheck.test\", value)\n\t}\n}\n\nvar transformSize TransformerFunc = func(value any) (any, error) {\n\tswitch value := value.(type) {\n\tcase int:\n\t\treturn int64(value), nil\n\tcase string:\n\t\treturn units.RAMInBytes(value)\n\t}\n\tpanic(fmt.Errorf(\"invalid type for size %T\", value))\n}\n\nvar transformStringToDuration TransformerFunc = func(value any) (any, error) {\n\tswitch value := value.(type) {\n\tcase string:\n\t\td, err := time.ParseDuration(value)\n\t\tif err != nil {","sourceCodeStart":874,"sourceCodeEnd":910,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/compose/loader/loader.go#L874-L910","documentation":"Error \"invalid type %T for healthcheck.test\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/compose/loader/loader.go:892 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}