Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
tirmidhi:3604iAbū Dāwud Sulaymān b. al-Ashʿath al-Sijzī > Qaṭan al-Baṣrī > Jaʿfar b. Sulaymān > Thābit > Anas

the Messenger of Allah ﷺ said: "Each one of you must ask his Lord for his every need, even for a shoestring (or sandal strap) if it breaks.”  

This is a Gharīb hadith, and more than one person has narrated this hadith from Jafar b. Sulayman, from Thabit al-Bunani, from the Prophet ﷺ, and they did not mention Anas in it.
الترمذي:٣٦٠٤iحَدَّثَنَا أَبُو دَاوُدَ سُلَيْمَانُ بْنُ الأَشْعَثِ السِّجْزِيُّ حَدَّثَنَا قَطَنٌ الْبَصْرِيُّ أَخْبَرَنَا جَعْفَرُ بْنُ سُلَيْمَانَ عَنْ ثَابِتٍ عَنْ أَنَسٍ قَالَ

قَالَ رَسُولُ اللَّهِ ﷺ «لِيَسْأَلْ أَحَدُكُمْ رَبَّهُ حَاجَتَهُ كُلَّهَا حَتَّى يَسْأَلَ شِسْعَ نَعْلِهِ إِذَا انْقَطَعَ۔»  

هَذَا حَدِيثٌ غَرِيبٌ وَرَوَى غَيْرُ وَاحِدٍ هَذَا الْحَدِيثَ عَنْ جَعْفَرِ بْنِ سُلَيْمَانَ عَنْ ثَابِتٍ الْبُنَانِيِّ عَنِ النَّبِيِّ ﷺ وَلَمْ يَذْكُرُوا فِيهِ عَنْ أَنَسٍ

See similar narrations below:

Collected by Tirmidhī

Make dua to Allah for everything, even for salt or if your shoelace breaks

tirmidhi:3604jṢāliḥ b. ʿAbdullāh > Jaʿfar b. Sulaymān > Thābit al-Bunānī

that the Messenger of Allah ﷺ said: "Each one of you must ask his Lord for his need, even for some salt and even for his shoestring (or sandal strap) if it breaks.”  

And this is more authentic than the hadith of Qatan from Jafar b. Sulayman.
الترمذي:٣٦٠٤jحَدَّثَنَا صَالِحُ بْنُ عَبْدِ اللَّهِ أَخْبَرَنَا جَعْفَرُ بْنُ سُلَيْمَانَ عَنْ ثَابِتٍ الْبُنَانِيِّ

أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ: «لِيَسْأَلْ أَحَدُكُمْ رَبَّهُ حَاجَتَهُ حَتَّى يَسْأَلَهُ الْمِلْحَ وَحَتَّى يَسْأَلَهُ شِسْعَ نَعْلِهِ إِذَا انْقَطَعَ۔»  

وَهَذَا أَصَحُّ مِنْ حَدِيثِ قَطَنٍ عَنْ جَعْفَرِ بْنِ سُلَيْمَانَ