``` bz, err := io.ReadAll(resp) if err != nil { errMsg := r.errorResponse(RegistryErrorCodeManifestInvalid, err.Error(), nil) ctx.Set(types.HttpEndpointErrorKey, errMsg) return ctx.JSONBlob(http.StatusNotFound, errMsg) } _ = resp.Close() ```