Quick. What happens when someone passes a poorly formatted string to your interface? The interface notices and responds with the correct error code. Great. What if they set the colorize_output and the no_ouput flags? Do you colorize nothing? Arguably correct, but also arguably wrong, and probably indicative of a confused user. You can, and should, be testing all those cases, and others, and having well defined answers. Unit testing can help you avoid lots of customer issues. But that's just based on your interpretation, not your customers.
Then there's the whole "You gave me what I asked for, not what I wanted" situation. Again, you're arguably correct, but you don't have a happy customer. Remember, your customers want a problem solved, not a bag of features. So unit testing isn't enough. You need to do more, which leads to:
"Testing leads to failure, and failure leads to understanding." - Burt Rutan
Understanding what? Not just the specific feature on the ticket you're implementing. Understanding your customer's problems. Their workflow. Their environment. And their expectations. The kind of understanding you get from testing the thing you're building in the environment it will live in. That doesn't mean that you don't do unit testing or integration testing. Instead, it's another kind of testing you need to do.
And it's not just throw it over the wall testing, although that has value too. At least at first, you need to work with your customer to understand how they're using it. You need to help them understand how you expect it to be used. And together you come to understand the differences between the two. Then you can close the understanding gap.
You need to interact with your customer. You need to interact frequently to keep cycle times low. You need to interact deeply because you need to understand not just the surface issues, but why they're issues. And that kind of understanding requires a lot of information to be transferred. So you want high bandwidth communications. Bug reports might tell you what, but they're not too good at the why. So in person if possible, or at least screen share.
Because you can't solve a problem you don't understand, and you can't understand your customer without really seeing how they work. And that applies to all customers, internal and external.