calling apis sequentially with spinner and error handling