Implemented error handling for failed async calls.