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

Update README.md to fix HTTPResponseError #1135

Merged
merged 1 commit into from Oct 7, 2021

Commits on Apr 16, 2021

  1. Update README.md to fix HTTPResponseError

    In the 'Handling client and server errors', the class HTTPResponseError constructor has to call 'super()' before accessing 'this.response'
    
    Not doing this throws the following exception: "ReferenceError: Must call super constructor in derived class before accessing 'this' or returning from derived constructor"
    
    Fix: This just changes the order so super(...) is first, then this.response...
    
    MDN Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/super#using_super_in_classes
    thedanfernandez committed Apr 16, 2021
    Copy the full SHA
    01df14c View commit details
    Browse the repository at this point in the history