You are supposed to say this mantra (sloka?) after performing any ritual to atone for any errors made:
yasya smṛtyā ca nāmoktayā tapojñayākriyādiṣu
nyūnaṃ saṃpūrṇatāṃ yāti sadhyo vande tamacyutam
यस्य स्मृत्या च नामोक्तया तपोज्ञयाक्रियादिषु
न्यूनं संपूर्णतां याति सध्यो वन्दे तमच्युतम्
I praise that Eternal Lord by remembering whom and uttering whose name all deficiences are supplied in every sacrifice and ceremony.
This mantra is cited in the commentary on the Yajnvalkya Smriti called the Mitākṣarā here.
Which scripture is this mantra from?