Nishitbaria / Dev-Exchange

A community-driven platform for asking and answering programming questions. Get help, share knowledge, and collaborate with developers from around the world. Explore topics in web development, mobile app development, algorithms, data structures, and more.
https://devexchanges.vercel.app/
MIT License
11 stars 24 forks source link

Bug: Bug on question page while answering #34

Closed Sahilll15 closed 1 month ago

Sahilll15 commented 1 month ago

Description:

{"error":"Cannot read properties of undefined (reading '0')"}

Steps to Reproduce:

  1. Go to the question page.
  2. Attempt to answer the question.
  3. Observe the error.

Expected Behavior:

The error should be properly handled, and if it persists, an error message should be displayed.

Additional Information:

It seems like the API might not be receiving the correct input, leading to this error. We need to ensure proper error validation on this page.

Nishitbaria commented 1 month ago

Hey @Sahilll15 I am assigning this issue to you

you can start working on this issue

Happy hacking ✨

Sahilll15 commented 1 month ago

@Nishitbaria ig its the problem with the chatGPTs tokens that's causing the issue I have implemented the same solution using geminiAPi have a look at that Screenshot 2024-05-16 at 1 59 55 AM

If you are okay with the implementation we can move ahead with this solution

Nishitbaria commented 1 month ago

Description:

{"error":"Cannot read properties of undefined (reading '0')"}

Steps to Reproduce:

  1. Go to the question page.
  2. Attempt to answer the question.
  3. Observe the error.

Expected Behavior:

The error should be properly handled, and if it persists, an error message should be displayed.

Additional Information:

It seems like the API might not be receiving the correct input, leading to this error. We need to ensure proper error validation on this page.

I am Okay with Gemini : Use Verser ai SDK for that : https://sdk.vercel.ai/providers/legacy-providers/google