Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CustomerGEHMiddleware with @OverrideProvider does not work #3

Open
jzingler-lp opened this issue Jul 8, 2020 · 3 comments
Open

CustomerGEHMiddleware with @OverrideProvider does not work #3

jzingler-lp opened this issue Jul 8, 2020 · 3 comments

Comments

@jzingler-lp
Copy link

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] " +
@Romakita
Copy link
Collaborator

Romakita commented Jul 9, 2020

Hello @jzingler-lp
I fixed the example :)

See you
Romain

@jzingler-lp
Copy link
Author

Thanks @Romakita, so did you just remove the @OverrideProvider all together?

@Romakita
Copy link
Collaborator

Romakita commented Jul 9, 2020

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants