When the AI-generated code fails, how you present the error matters. Include:
The full stack trace
The relevant code with line numbers
Your environment (language version, OS, framework)
What you expected vs what happened
The more context you provide, the more accurate the fix. "It doesn't work" gives the AI nothing to work with.