What is significant about error handling in async module operations?
// api.js
export async function fetchData() {
const response = await fetch('https://api.example.com/data');
return response.json();
}
// main.js
import { fetchData } from './api.js';
try {
const data = await fetchData();
} catch (error) {
console.error('Failed to fetch:', error);
}
Error handling in async module operations follows normal Promise error propagation: 1) Errors in async operations propagate through Promise chains across module boundaries, 2) try/catch blocks in async functions can catch errors from imported async functions, 3) Error stacks preserve the cross-module call chain for debugging, 4) Module boundaries don't affect the normal async/await error handling patterns, 5) This allows for centralized error handling at appropriate levels of the application, 6) It works consistently with both statically and dynamically imported modules, 7) This behavior enables proper error handling strategies in modular applications.