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

Unexpected End of JSON input #4

Open
Davoleo opened this issue May 16, 2022 · 1 comment
Open

Unexpected End of JSON input #4

Davoleo opened this issue May 16, 2022 · 1 comment

Comments

@Davoleo
Copy link
Contributor

Davoleo commented May 16, 2022

When trying to request game versions of the 2 games listed below an internal exception is thrown with the following message and stacktrace:

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at IncomingMessage.<anonymous> (D:\Everything\Coding\misc\curse-updates\node_modules\node-curseforge\dist\utils.js:51:34)
    at IncomingMessage.emit (node:events:406:35)
    at endReadableNT (node:internal/streams/readable:1343:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

Related API Endpoint: /v1/games/{gameId}/versions

Games Where this issue occurs and is reproduceable:

  • Terraria (id: 431)
  • Starcraft II (id: 65)

Note: this seems to be related to the fact the API returns 404 when requesting game versions for these titles directly

HTTP/1.1 404 Not Found
Content-Length: 0
Connection: close
Date: Mon, 16 May 2022 17:33:24 GMT
X-Cache: Error from cloudfront
Via: 1.1 f0f5607a03d2ae4c43b553dc2cef0c9e.cloudfront.net (CloudFront)
@Mondanzo
Copy link
Owner

Mondanzo commented Jun 3, 2022

Ya gotta love Curseforge and their inconsistency. I guess best I could try to do is add a nullable type to the response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants