Node.js - Error Handling Patterns
How do you correctly attach an error handler to a Promise called
fetchData to catch any rejection?fetchData to catch any rejection?fetchData is a function returning a Promise, so it must be called first.catch to the returned PromisefetchData() returns a Promise, then catch handles errors.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions