Use try/catch to handle errors in async functions. Rejected promises throw when awaited.
async function loadData() {
try {
const data = await fetchData();
return process(data);
} catch (error) {
console.error("Failed:", error);
return null;
}
}
This feels more natural than .catch() chains.