added test to throw error inside a platform, and can't be caught because of promising