The Prophet (ﷺ) said: if one has a sudden attack of vomiting while one is fasting, no atonement is required of him, but if he vomits intentionally he must make atonement.
Sunan Abi Dawud Book 14, Hadith 68