Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] SyntaxError: Unexpected token < in JSON during AI SDK usage after update #246

Open
1 task done
cyber-bytezz opened this issue Jun 23, 2024 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@cyber-bytezz
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I am experiencing a JSON parsing error when using the AI SDK. The error message is: SyntaxError: Unexpected token < in JSON at position 0.

Expected Behavior

The JSON parsing should work correctly without any errors, allowing smooth operation of the SDK functions.

Steps To Reproduce

In this environment: [local machine]
With this config: [Provide any configuration details relevant to the SDK usage]
Run the following code snippet:

fetch('https://api.example.com/endpoint')
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

Environment

SDK Version
Node.js Version

Anything else?

No response

@cyber-bytezz cyber-bytezz changed the title [BUG] <SyntaxError: Unexpected token < in JSON during AI SDK usage after update> [BUG] SyntaxError: Unexpected token < in JSON during AI SDK usage after update Jun 23, 2024
@miurla miurla added the bug Something isn't working label Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants