Node.js - Error Handling Patterns
Identify the error in this code snippet that tries to catch a Promise rejection:
fetch('https://api.example.com/data')
.then(response => response.json())
.then(data => console.log(data))
.catch(console.error());