chore(orchestration): serialize error (#6967)

This commit is contained in:
Carlos R. L. Rodrigues
2024-04-06 11:22:48 +02:00
committed by GitHub
parent 232322d035
commit d333db0842
9 changed files with 87 additions and 35 deletions

View File

@@ -66,7 +66,7 @@ describe("CreateInventoryItem workflow", function () {
{
action: "fail_step",
handlerType: "invoke",
error: new Error(`Failed`),
error: expect.objectContaining({ message: `Failed` }),
},
])

View File

@@ -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`,
}),
},
])

View File

@@ -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`,
}),
},
])