myPromise .then(result => { console.log("Succès:", result); }) .catch(error => { console.log("Erreur:", error.message); }); // Chaînage de .then() fetchUser(1) .then(user => fetchPosts(user.id)) .then(posts => console.log(posts)) .catch(error => console.log("Erreur:", error));