Improve api error handling
Increase event wait