Handle API communication errors