{"id":"0902a8bbf803d1ec","repo":"docker/cli","slug":"invalid-type-t-for-service-volume","errorCode":null,"errorMessage":"invalid type %T for service volume","messagePattern":"invalid type %T for service volume","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/compose/loader/loader.go","lineNumber":769,"sourceCode":"var transformBuildConfig TransformerFunc = func(data any) (any, error) {\n\tswitch value := data.(type) {\n\tcase string:\n\t\treturn map[string]any{\"context\": value}, nil\n\tcase map[string]any:\n\t\treturn data, nil\n\tdefault:\n\t\treturn data, fmt.Errorf(\"invalid type %T for service build\", value)\n\t}\n}\n\nvar transformServiceVolumeConfig TransformerFunc = func(data any) (any, error) {\n\tswitch value := data.(type) {\n\tcase string:\n\t\treturn volumespec.Parse(value)\n\tcase map[string]any:\n\t\treturn data, nil\n\tdefault:\n\t\treturn data, fmt.Errorf(\"invalid type %T for service volume\", value)\n\t}\n}\n\nvar transformServiceNetworkMap TransformerFunc = func(value any) (any, error) {\n\tif list, ok := value.([]any); ok {\n\t\tmapValue := map[any]any{}\n\t\tfor _, name := range list {\n\t\t\tmapValue[name] = nil\n\t\t}\n\t\treturn mapValue, nil\n\t}\n\treturn value, nil\n}\n\nvar transformStringOrNumberList TransformerFunc = func(value any) (any, error) {\n\tlist := value.([]any)\n\tresult := make([]string, len(list))\n\tfor i, item := range list {","sourceCodeStart":751,"sourceCodeEnd":787,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/compose/loader/loader.go#L751-L787","documentation":"Error \"invalid type %T for service volume\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/compose/loader/loader.go:769 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}