From Sahih Muslim (Hadith 1260):
Abu Huraira reported:The Messenger of Allah (ﷺ) said: If anyone hears a man crying out in the mosque about something he has lost, he should say: May Allah not restore it to you, for the mosques were not built for this
Reference: Muslim 1260