From 9d64f2a12911364c4da32bf0ab1c9cee2a78a207 Mon Sep 17 00:00:00 2001 From: nojaf Date: Thu, 5 Sep 2024 15:40:42 +0200 Subject: [PATCH] Add link to Promise.catch API docs --- pages/docs/manual/latest/promise.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/docs/manual/latest/promise.mdx b/pages/docs/manual/latest/promise.mdx index 5fd0f9e78..16a2b891e 100644 --- a/pages/docs/manual/latest/promise.mdx +++ b/pages/docs/manual/latest/promise.mdx @@ -77,6 +77,10 @@ let logAsyncMessage = async () => { Needless to say, the async / await version offers better ergonomics and less opportunities to run into type issues. +### Handling Rejected Promises + +You can handle a rejected promise using the [`Promise.catch()`](./api/core/promise#value-catch) method, which allows you to catch and manage errors effectively. + ### Run multiple promises in parallel In case you want to launch multiple promises in parallel, use `Promise.all`: