What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
To log a promise error and keep it visible to the caller, rethrow it in the .catch() callback. A catch that logs and returns normally turns the promise returned by .catch() into a fulfilled promise. For nested asynchronous work, return the inner promise—or use await inside the try block that should handle its rejection.
Why can .catch() make a promise succeed?
.catch(onRejected) is a step in a promise chain and returns a new promise. If onRejected returns normally, that new promise fulfills with the returned value. If the callback returns nothing, the fulfillment value is typically undefined. If the callback throws, the promise returned by .catch() rejects with the thrown error.
That is why this log-only handler swallows the rejection from the caller’s perspective:
return saveRecord(record).catch((error) => {
console.error(error);
});
The logging happened, but the catch callback completed normally. Any downstream .then() now runs on a fulfilled promise, and a caller awaiting the returned promise will not see the original rejection.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Choose whether to recover or preserve failure
A catch should express what the application intends to do next. Recover when the fallback is a valid result for downstream code; preserve failure when logging, cleanup, or extra context is not enough to make the operation successful.
| Intent | Catch behavior | What downstream code receives |
|---|---|---|
| Recover locally | Return a meaningful fallback value. | A fulfilled promise containing that fallback; later steps continue as success. |
| Preserve failure | Log, clean up, or add context, then throw. | A rejected promise for the next handler or caller to decide how to handle. |
Recover with an intentional fallback
Returning a fallback is not inherently a mistake. It is a recovery path, so choose a value that downstream code can safely treat as success:
return loadSettings().catch((error) => {
logError(error);
return defaultSettings;
});
After this handler, the chain is fulfilled with defaultSettings. Use this pattern only if proceeding with that fallback is acceptable for the application.
Log or clean up, then rethrow
If the caller still needs to know that the operation failed, rethrow after local handling:
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
return saveRecord(record).catch((error) => {
logError(error);
throw error;
});
MDN explains that when an error must be handled immediately but the error state must continue down the chain, the rejection handler must throw an error. Rethrowing the same error preserves its identity and original stack information more directly than replacing it without a reason. If adding context with a new error, use the runtime and project’s supported cause pattern, such as new Error("Could not save record", { cause: error }), where available.
How do I keep a nested promise attached to its caller?
An inner promise is part of the outer chain only when the callback returns it (or otherwise joins its result). If code starts asynchronous work and discards its promise, the outer chain does not automatically wait for that work or catch its later rejection.
Return the inner promise
This callback launches inner() but returns nothing, so the promise from the inner operation is detached from the chain returned by outer():
return outer().then(() => {
inner();
});
Return the inner promise to connect its fulfillment or rejection to the outer chain:
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsRank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
return outer().then(() => {
return inner();
}).catch((error) => {
logError(error);
throw error;
});
Now the catch can observe a rejection from either outer() or the returned inner(). For simple sequences, a flat chain is often easier to read and gives a clearer scope for error handling than deeply nested .then() calls.
Be careful with nested catches
A catch handles rejections that reach the particular promise it is attached to. A separately started promise branch needs its own rejection handler, or its result must be returned or awaited so it joins the chain. Nesting a .catch() around one branch does not automatically handle errors from every asynchronous task started nearby.
How should nested promise errors be handled with async/await?
When an awaited promise rejects, await throws its rejection reason inside the async function. Put the await in the try block whose catch is meant to own that failure:
async function loadProfileForPage(id) {
try {
return await loadProfile(id);
} catch (error) {
showProfileError(error);
throw error;
}
}
Because the promise is awaited within the block, its rejection enters the local catch. Rethrow if this function cannot recover and its caller must also see the failure.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Why try alone is not enough
This does not catch a later rejection from the asynchronous operation:
try {
doAsyncWork();
} catch (error) {
handleError(error);
}
The try can catch a synchronous exception thrown while doAsyncWork() is invoked, but it does not wait for the promise or catch its later rejection. Use await in the try block or attach and return a rejection handler.
Account for callbacks the API does not await
Some APIs accept a callback but do not use or await the promise that an async callback returns. Throwing inside such a callback rejects that callback’s promise; it does not necessarily reject the API’s outer operation. Check the API’s callback contract and explicitly route the failure to the component responsible for it. Do not assume every async callback is joined to the operation that invoked it.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What does a complete propagation pattern look like?
This example logs at one boundary, then leaves recovery or further propagation to the caller:
Recommended Free Tools
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
function loadProfile(id) {
return fetchProfile(id)
.then((profile) => enrichProfile(profile))
.catch((error) => {
logError(error);
throw error; // preserve rejection for the caller
});
}
async function loadProfileForPage(id) {
try {
return await loadProfile(id);
} catch (error) {
showProfileError(error);
throw error; // keep failure visible if this caller cannot recover
}
}
The first function returns the full chain, including the enrichment work and its catch. The second awaits that returned promise inside its try. If the page-level function can genuinely recover—for example, by returning an intentional error-state value—instead of rethrowing, its own returned promise will fulfill with that value. Whether the caller recovers or rethrows is an application decision.
In code that does no work in the try after calling loadProfile(id), return loadProfile(id) can replace return await loadProfile(id). Keeping await makes it explicit that the local try/catch handles the promise rejection.
How are unhandled rejections reported by the runtime?
Application-level catches should be attached where the code owns the operation; host-level unhandled-rejection reporting is a separate safety signal, not a replacement for that handling. Browsers expose an unhandledrejection event when a rejected promise has no handler, and a rejectionhandled event if a handler is attached later. Node.js v26.10.0 documents process events for unhandled and subsequently handled rejections. Its documented default --unhandled-rejections mode is throw, which raises an unhandled rejection as an uncaught exception. Node behavior can depend on version and flags, so check the target runtime rather than treating process behavior as universal.
Do not use a global unhandled-rejection or uncaught-exception handler as the ordinary fix for a promise whose failure should have been handled by a specific caller. Attach a catch to the intended chain, return nested work, or await it within the right try.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

