{"id":"c8d86c5326d5b563","repo":"docker/cli","slug":"invalid-type-t-for-ulimits","errorCode":null,"errorMessage":"invalid type %T for ulimits","messagePattern":"invalid type %T for ulimits","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/compose/loader/loader.go","lineNumber":535,"sourceCode":"\t\t\tlogrus.Warn(\"cannot expand '~', because the environment lacks HOME\")\n\t\t\treturn srcPath\n\t\t}\n\t\treturn strings.Replace(srcPath, \"~\", home, 1)\n\t}\n\treturn srcPath\n}\n\nfunc transformUlimits(data any) (any, error) {\n\tswitch value := data.(type) {\n\tcase int:\n\t\treturn types.UlimitsConfig{Single: value}, nil\n\tcase map[string]any:\n\t\tulimit := types.UlimitsConfig{}\n\t\tulimit.Soft = value[\"soft\"].(int)\n\t\tulimit.Hard = value[\"hard\"].(int)\n\t\treturn ulimit, nil\n\tdefault:\n\t\treturn data, fmt.Errorf(\"invalid type %T for ulimits\", value)\n\t}\n}\n\n// LoadNetworks produces a NetworkConfig map from a compose file Dict\n// the source Dict is not validated if directly used. Use Load() to enable validation\nfunc LoadNetworks(source map[string]any, version string) (map[string]types.NetworkConfig, error) {\n\tnetworks := make(map[string]types.NetworkConfig)\n\terr := Transform(source, &networks)\n\tif err != nil {\n\t\treturn networks, err\n\t}\n\tfor name, nw := range networks {\n\t\tif !nw.External.External {\n\t\t\tcontinue\n\t\t}\n\t\tswitch {\n\t\tcase nw.External.Name != \"\":\n\t\t\tif nw.Name != \"\" {","sourceCodeStart":517,"sourceCodeEnd":553,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/compose/loader/loader.go#L517-L553","documentation":"Error \"invalid type %T for ulimits\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/compose/loader/loader.go:535 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}