.catch()

A Promise method that schedules error handling for rejection.

What does .catch() do in JavaScript?

.catch() — A Promise method that schedules error handling for rejection.

orderReady.catch(error => {
    showError(error);
});

Level: Journeyman · More JavaScript terms at this level

Updated