CustomerGEHMiddleware with @OverrideProvider does not work
The CustomerGEHMiddleware is not enabled by default. When I do enable the CustomerGEHMiddleware by adding it to the Server.ts file it results in the following error.
Versions impacts: v5.46.0 to v5.59.4 (did not test versions less than v5.46.0)
error: {
status: 500,
message: "Class constructor CustomerGEHMiddleware cannot be invoked without 'new'",
stack: 'TypeError: Class constructor CustomerGEHMiddleware cannot be invoked ' +
"without 'new'\n at Layer.handle [as handle_request] " +
Hello @jzingler-lp I fixed the example :)
See you Romain
Thanks @Romakita, so did you just remove the @OverrideProvider all together?
Yes. Isn’t required to override the original provider since you can register it in the server before the original one. Override a provider can be problematic when you upgrade Ts.ED packages :)
This solution is more robust :)