chore(product): Improve product normalization and fix http router with tracing (#11724)

**What**
- Improve product normalization and prevent over fetching data
- Fix HTTP router wrap handler with tracing enabled
This commit is contained in:
Adrien de Peretti authored and GitHub committed 2025-03-05 13:04:25 +00:00
1 parent e81deb49f8
commit cc1309d370
15 files changed
+467 -121

No files matched your search

@@ -723,10 +723,8 @@ moduleIntegrationTestRunner<IProductModuleService>({
})
it("should throw because variant doesn't have all options set", async () => {
let error
try {
await service.createProducts([
const error = await service
.createProducts([
{
title: "Product with variants and options",
options: [
@@ -741,9 +739,7 @@ moduleIntegrationTestRunner<IProductModuleService>({
],
},
])
} catch (e) {
error = e
}
.catch((e) => e)
expect(error.message).toEqual(
`Product "Product with variants and options" has variants with missing options: [missing option]`