Improved async error handling.