The .catch() method handles errors. It catches rejections from anywhere in the chain above it.
fetchData()
.then(process)
.then(save)
.catch(error => {
console.error("Something failed:", error);
});
One .catch() at the end handles errors from any step.