False dichotomy. A library that is not a 100% perfect match for a problem you have to solve, will require glue code. Any bug in the glue code is in your own code but only exists because of the library.
I’m not going to eliminate every single third party dependency in my system, but I’m on my way to eliminating 90%, maybe more.
For me it’s less about bugs and more about supply chain security risk. And with AI and only building what I need from a dep, exactly how I need it, the cost of doing this is very low.