{"id":"f15989cce3d41f5e","repo":"docker/cli","slug":"invalid-type-for-size-t","errorCode":null,"errorMessage":"invalid type for size %T","messagePattern":"invalid type for size %T","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/compose/loader/loader.go","lineNumber":903,"sourceCode":"var 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 {\n\t\t\treturn value, err\n\t\t}\n\t\treturn types.Duration(d), nil\n\tdefault:\n\t\treturn value, fmt.Errorf(\"invalid type %T for duration\", value)\n\t}\n}\n\nfunc toServicePortConfigs(value string) ([]any, error) {\n\t// short syntax ([ip:]public:private[/proto])\n\t//","sourceCodeStart":885,"sourceCodeEnd":921,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/compose/loader/loader.go#L885-L921","documentation":"Error \"invalid type for size %T\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/compose/loader/loader.go:903 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}