Hadithcore
Mishkat al-Masabih, 2236

Jabir reported God’s messenger as saying, “No one offers a supplication without God bringing him what he asks or keeping away from him a like amount of evil, provided he does not ask for something sinful or for breaking ties of relationship.” Tirmidhi transmitted it.

وَعَنْ جَابِرٍ رَضِيَ اللَّهُ عَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «مَا مِنْ أَحَدٍ يَدْعُو بِدُعَاءٍ إِلَّا آتَاهُ اللَّهُ مَا سَأَلَ أَوْ كَفَّ عَنْهُ مِنَ السُّوءِ مِثْلَهُ مَا لَمْ يَدْعُ بِإِثْمٍ أَوْ قَطِيعَةِ رحم» . رَوَاهُ التِّرْمِذِيّ

References1 variant
In-Book Reference
Book 9, Hadith 13