chore(orchestration): serialize error (#6967)
This commit is contained in:
@@ -326,7 +326,7 @@ medusaIntegrationTestRunner({
|
||||
{
|
||||
action: "find-one-or-any-region",
|
||||
handlerType: "invoke",
|
||||
error: new Error("No regions found"),
|
||||
error: expect.objectContaining({ message: "No regions found" }),
|
||||
},
|
||||
])
|
||||
})
|
||||
@@ -417,9 +417,9 @@ medusaIntegrationTestRunner({
|
||||
{
|
||||
action: "confirm-inventory-step",
|
||||
handlerType: "invoke",
|
||||
error: new Error(
|
||||
"Some variant does not have the required inventory"
|
||||
),
|
||||
error: expect.objectContaining({
|
||||
message: "Some variant does not have the required inventory",
|
||||
}),
|
||||
},
|
||||
])
|
||||
})
|
||||
@@ -441,9 +441,9 @@ medusaIntegrationTestRunner({
|
||||
{
|
||||
action: "find-sales-channel",
|
||||
handlerType: "invoke",
|
||||
error: new Error(
|
||||
`Unable to assign cart to disabled Sales Channel: Webshop`
|
||||
),
|
||||
error: expect.objectContaining({
|
||||
message: `Unable to assign cart to disabled Sales Channel: Webshop`,
|
||||
}),
|
||||
},
|
||||
])
|
||||
})
|
||||
@@ -471,7 +471,9 @@ medusaIntegrationTestRunner({
|
||||
{
|
||||
action: "throw",
|
||||
handlerType: "invoke",
|
||||
error: new Error(`Failed to create cart`),
|
||||
error: expect.objectContaining({
|
||||
message: `Failed to create cart`,
|
||||
}),
|
||||
},
|
||||
])
|
||||
|
||||
@@ -508,7 +510,9 @@ medusaIntegrationTestRunner({
|
||||
{
|
||||
action: "throw",
|
||||
handlerType: "invoke",
|
||||
error: new Error(`Failed to create cart`),
|
||||
error: expect.objectContaining({
|
||||
message: `Failed to create cart`,
|
||||
}),
|
||||
},
|
||||
])
|
||||
|
||||
@@ -705,9 +709,9 @@ medusaIntegrationTestRunner({
|
||||
{
|
||||
action: "get-variant-price-sets",
|
||||
handlerType: "invoke",
|
||||
error: new Error(
|
||||
`Variants with IDs ${product.variants[0].id} do not have a price`
|
||||
),
|
||||
error: expect.objectContaining({
|
||||
message: `Variants with IDs ${product.variants[0].id} do not have a price`,
|
||||
}),
|
||||
},
|
||||
])
|
||||
})
|
||||
@@ -734,7 +738,9 @@ medusaIntegrationTestRunner({
|
||||
{
|
||||
action: "validate-variants-exist",
|
||||
handlerType: "invoke",
|
||||
error: new Error(`Variants with IDs prva_foo do not exist`),
|
||||
error: expect.objectContaining({
|
||||
message: `Variants with IDs prva_foo do not exist`,
|
||||
}),
|
||||
},
|
||||
])
|
||||
})
|
||||
@@ -975,7 +981,9 @@ medusaIntegrationTestRunner({
|
||||
{
|
||||
action: "throw",
|
||||
handlerType: "invoke",
|
||||
error: new Error(`Failed to update something after line items`),
|
||||
error: expect.objectContaining({
|
||||
message: `Failed to update something after line items`,
|
||||
}),
|
||||
},
|
||||
])
|
||||
|
||||
@@ -1064,9 +1072,9 @@ medusaIntegrationTestRunner({
|
||||
{
|
||||
action: "throw",
|
||||
handlerType: "invoke",
|
||||
error: new Error(
|
||||
`Failed to do something after deleting line items`
|
||||
),
|
||||
error: expect.objectContaining({
|
||||
message: `Failed to do something after deleting line items`,
|
||||
}),
|
||||
},
|
||||
])
|
||||
|
||||
@@ -1178,9 +1186,9 @@ medusaIntegrationTestRunner({
|
||||
{
|
||||
action: "throw",
|
||||
handlerType: "invoke",
|
||||
error: new Error(
|
||||
`Failed to do something after linking cart and payment collection`
|
||||
),
|
||||
error: expect.objectContaining({
|
||||
message: `Failed to do something after linking cart and payment collection`,
|
||||
}),
|
||||
},
|
||||
])
|
||||
|
||||
@@ -1353,9 +1361,9 @@ medusaIntegrationTestRunner({
|
||||
{
|
||||
action: "throw",
|
||||
handlerType: "invoke",
|
||||
error: new Error(
|
||||
`Failed to do something after updating payment collections`
|
||||
),
|
||||
error: expect.objectContaining({
|
||||
message: `Failed to do something after updating payment collections`,
|
||||
}),
|
||||
},
|
||||
])
|
||||
|
||||
@@ -1807,9 +1815,9 @@ medusaIntegrationTestRunner({
|
||||
expect(errors).toEqual([
|
||||
{
|
||||
action: "get-shipping-option-price-sets",
|
||||
error: new Error(
|
||||
`Shipping options with IDs ${shippingOption.id} do not have a price`
|
||||
),
|
||||
error: expect.objectContaining({
|
||||
message: `Shipping options with IDs ${shippingOption.id} do not have a price`,
|
||||
}),
|
||||
handlerType: "invoke",
|
||||
},
|
||||
])
|
||||
|
||||
@@ -110,9 +110,9 @@ medusaIntegrationTestRunner({
|
||||
{
|
||||
action: "throw",
|
||||
handlerType: "invoke",
|
||||
error: new Error(
|
||||
`Failed to do something after creating payment sessions`
|
||||
),
|
||||
error: expect.objectContaining({
|
||||
message: `Failed to do something after creating payment sessions`,
|
||||
}),
|
||||
},
|
||||
])
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ describe("CreateInventoryItem workflow", function () {
|
||||
{
|
||||
action: "fail_step",
|
||||
handlerType: "invoke",
|
||||
error: new Error(`Failed`),
|
||||
error: expect.objectContaining({ message: `Failed` }),
|
||||
},
|
||||
])
|
||||
|
||||
|
||||
@@ -89,7 +89,9 @@ describe.skip("CreateProduct workflow", function () {
|
||||
{
|
||||
action: "fail_step",
|
||||
handlerType: "invoke",
|
||||
error: new Error(`Failed to create products`),
|
||||
error: expect.objectContaining({
|
||||
message: `Failed to create products`,
|
||||
}),
|
||||
},
|
||||
])
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { WorkflowTypes } from "@medusajs/types"
|
||||
import {
|
||||
Handlers,
|
||||
updateProducts,
|
||||
UpdateProductsActions,
|
||||
} from "@medusajs/core-flows"
|
||||
import { WorkflowTypes } from "@medusajs/types"
|
||||
import { pipe } from "@medusajs/workflows-sdk"
|
||||
import path from "path"
|
||||
|
||||
@@ -86,7 +86,9 @@ describe.skip("UpdateProduct workflow", function () {
|
||||
{
|
||||
action: "fail_step",
|
||||
handlerType: "invoke",
|
||||
error: new Error(`Failed to update products`),
|
||||
error: expect.objectContaining({
|
||||
message: `Failed to update products`,
|
||||
}),
|
||||
},
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user