system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: how do our bodies know when we've ingested something toxic?

I just ate something that had expired without realizing it, and within a minute I was throwing up. How did my body know that I needed to expel it from my stomach?
gpt
Short answer, your brain told it to. 

Long answer,  your nose is the first defense against eating something bad. If you bring something to your mouth that smells bad, your nose is gonna tell you it's bad. Your taste buds are next, if something tastes bad, we spit it out. Next your throat and esophagus. As the food slides down your throat, food that's gone bad will release chemicals that can damage the cells lining your esophagus, that will signal your brain and cause you to gag and could expel bad food. Next into your stomach where the food begins to break down in earnest. Very strong acid in our stomachs begin breaking down whatever we eat almost immediately. If the bad food starts releasing chemicals that are damaging, toxic, or irritating to the stomach, your stomach will signal your brain to throw up whatever is in the stomach. Next down to the intestines. The food has now completely dissolved and your intestines drain the moisture and nutrients out of it, while moving it through your intestines by way of these little finger- like things called villi. If the bad food starts releasing something that irritates the villi, your body will try and get rid of it, but since going up isn't an option, gotta go down.