fix(event-bus-local): Error handling (#3575)

**What**

The error handling was applied on the emit, which always succeed. On the other hand, the `on` which calls the handler, was not handling any errors and therefore crashed the server
This commit is contained in:
Adrien de Peretti
2023-03-24 13:49:29 +00:00
committed by GitHub
parent b57ea22461
commit 4a7bdc917a
4 changed files with 187 additions and 179 deletions
@@ -2,7 +2,6 @@ import { IdMap } from "medusa-test-utils"
import { request } from "../../../../../helpers/test-request"
import { ProductServiceMock } from "../../../../../services/__mocks__/product"
import { ProductVariantServiceMock } from "../../../../../services/__mocks__/product-variant"
import { EventBusServiceMock } from "../../../../../services/__mocks__/event-bus"
describe("POST /admin/products/:id", () => {
describe("successfully updates a product", () => {