What does the chatbot say about that error? It's supposed to use a conversation model and a trial-and-error approach. So it gives you a first guess, you're supposed to tell it what's wrong with it, it fixes those problems (or at least tries to), you tell it what's still wrong, etc.
These things are not intelligent, by the way. They just mash together whatever they found on the internet. Sometimes it just happens to work, and it tickles your brain in a similar way that the plagiarized or infringed original did, but that's all it is. Massive intellectual property theft with wildly-variable results.