{"id":"025b241597ee1ce9","repo":"docker/cli","slug":"invalid-platform-w-025b24","errorCode":null,"errorMessage":"invalid platform: %w","messagePattern":"invalid platform: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/image/load.go","lineNumber":86,"sourceCode":"\t\t// depleting the standby list un-necessarily. On Linux, this equates to a regular os.Open.\n\t\tfile, err := sequential.Open(opts.input)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer func() { _ = file.Close() }()\n\t\tinput = file\n\t}\n\n\tvar options []client.ImageLoadOption\n\tif opts.quiet || !dockerCli.Out().IsTerminal() {\n\t\toptions = append(options, client.ImageLoadWithQuiet(true))\n\t}\n\n\tplatformList := []ocispec.Platform{}\n\tfor _, p := range opts.platform {\n\t\tpp, err := platforms.Parse(p)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid platform: %w\", err)\n\t\t}\n\t\tplatformList = append(platformList, pp)\n\t}\n\tif len(platformList) > 0 {\n\t\toptions = append(options, client.ImageLoadWithPlatforms(platformList...))\n\t}\n\n\tres, err := dockerCli.Client().ImageLoad(ctx, input, options...)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer func() { _ = res.Close() }()\n\n\treturn jsonstream.Display(ctx, res, dockerCli.Out())\n}\n","sourceCodeStart":68,"sourceCodeEnd":102,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/image/load.go#L68-L102","documentation":"Error \"invalid platform: %w\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/command/image/load.go:86 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}