{"id":"0dc30a1be42e91ce","repo":"docker/cli","slug":"failed-to-mount-blob-s-to-s-w","errorCode":null,"errorMessage":"failed to mount blob %s to %s: %w","messagePattern":"failed to mount blob (.+?) to (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/registryclient/client.go","lineNumber":85,"sourceCode":"// MountBlob into the registry, so it can be referenced by a manifest\nfunc (c *client) MountBlob(ctx context.Context, sourceRef reference.Canonical, targetRef reference.Named) error {\n\trepoEndpoint, err := newDefaultRepositoryEndpoint(targetRef, c.insecureRegistry)\n\tif err != nil {\n\t\treturn err\n\t}\n\trepoEndpoint.actions = []string{\"pull\", \"push\"}\n\trepo, err := c.getRepositoryForReference(ctx, targetRef, repoEndpoint)\n\tif err != nil {\n\t\treturn err\n\t}\n\tlu, err := repo.Blobs(ctx).Create(ctx, distributionclient.WithMountFrom(sourceRef))\n\tswitch err.(type) {\n\tcase distribution.ErrBlobMounted:\n\t\tlogrus.Debugf(\"mount of blob %s succeeded\", sourceRef)\n\t\treturn nil\n\tcase nil:\n\tdefault:\n\t\treturn fmt.Errorf(\"failed to mount blob %s to %s: %w\", sourceRef, targetRef, err)\n\t}\n\t_ = lu.Cancel(ctx)\n\tlogrus.Debugf(\"mount of blob %s created\", sourceRef)\n\treturn ErrBlobCreated{From: sourceRef, Target: targetRef}\n}\n\n// PutManifest sends the manifest to a registry and returns the new digest\nfunc (c *client) PutManifest(ctx context.Context, ref reference.Named, manifest distribution.Manifest) (digest.Digest, error) {\n\trepoEndpoint, err := newDefaultRepositoryEndpoint(ref, c.insecureRegistry)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\trepoEndpoint.actions = []string{\"pull\", \"push\"}\n\trepo, err := c.getRepositoryForReference(ctx, ref, repoEndpoint)\n\tif err != nil {\n\t\treturn \"\", err\n\t}","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/internal/registryclient/client.go#L67-L103","documentation":"Error \"failed to mount blob %s to %s: %w\" thrown in docker/cli.","triggerScenarios":"Thrown at internal/registryclient/client.go:85 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}