Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialKira Banks
Front End Web Development Techdegree Student 9,058 PointsMy AI won't answer. Error 429 in the Console
I am getting an error in the console when I try asking my AI chat a question. I don't believe I overloaded it with requests or anything because it gave me this error from the start:
index.js:44 POST https://api.openai.com/v1/chat/completions 429
index.js:72 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '0')
at updateMessage (index.js:72:36)
at index.js:62:19
I can't seem to find anything different in my code from the video, so I'm not sure what the issue is. If anyone could help it would be greatly appreciated!
2 Answers
Rohald van Merode
Treehouse StaffHi Kira Banks 👋
The 429 status code indicates that you're being rate limited. When on a free plan for the OpenAI API you're limited to make 3 requests per minute. If you make more than 3 request per minute you'll experience this error. After waiting for a minute you should be getting the responses back again as expected 🙂
Julia Lissel
3,801 PointsI have the same issue, I can't get any response back Kira Banks Rohald van Merode And I have waited several minutes
Kira Banks
Front End Web Development Techdegree Student 9,058 PointsI still haven't found a resolution to this either. Will update you if I figure it out. :')
Kira Banks
Front End Web Development Techdegree Student 9,058 PointsKira Banks
Front End Web Development Techdegree Student 9,058 PointsI see, I haven't been able to get it to respond at all though. I'm not sure why I'm getting the 429 error with just one request. Is there anything else I should check? I also tried creating and connecting a new api key, but no luck. :(