Neither humans nor AI write flawless code, but if you actually understand how your code works, you'll have a significantly easier time finding that edge case, with or without AI.
If you only ever let your AI do everything for you, you're at its mercy for debugging.