-
Notifications
You must be signed in to change notification settings - Fork 115
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
Allow HttpError extension by ES6 classes #98
Comments
Closed
moving this comment and repro from another issue #101 :
|
There's two different concepts in this issue. Extending
|
This was referenced Jul 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To allow better interoperability with ES6 classes (which are forced to call the super() constructor) it is better to add the following condition to the HttpError constructor:
This way the class can be extended with a concrete class like this:
A variant using ES6 classes as base class is shown here but the same works with old school constructor functions as well.
The text was updated successfully, but these errors were encountered: