Jabir bin Abdullah reported,

The Messenger of Allah ﷺ forbade us from eating onions and leeks, but necessity overcame us and we ate some of them. He said, "Whoever has eaten from this foul plant must not come near our mosque, for the angels are offended by what offends humans."In another narration, "Whoever has eaten from this vegetable, garlic" — and Mura once said, "Whoever has eaten onions, garlic, or leeks" — "must not come near our mosque, for the angels are offended by what offends the children of Adam."

Azami 601

Sahih

عن جابر، قال

نهى رسول الله ﷺ عن أكل البصل والكراث، فغلبتنا الحاجة فأكلنا منها، فقال: من أكل من هذه الشجرة الخبيثة فلا يقربن مسجدنا، فإن الملائكة تتأذى مما يتأذى به الإنسان. وفي رواية: من أكل من هذه البقلة الثوم ( وقال مرة: من أكل البصل والثوم والكراث) فلا يقربن مسجدنا، فإن الملائكة تتأذى مما يتأذى منه بنو آدم.

الأعظمي 601صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Belief in the angels
Section
Angels are harmed by what harms humans
Numbering
Jami al-Kamil 601 (2nd edition)
Azami 601