octokit / request.js

Send parameterized requests to GitHub’s APIs with sensible defaults in browsers and Node
MIT License
224 stars 61 forks source link

[BUG]: HttpError: Unexpected end of JSON input when utilizing `if-none-match` header #659

Closed paulober closed 5 months ago

paulober commented 5 months ago

What happened?

I got a HttpError: Unexpected end of JSON input by octokit after doing a request with "if-none-match": <my-last-etag> in my headers.

Versions

Node: v18.15.0 Octokit: v3.1.2

Relevant log output

[error] HttpError: Unexpected end of JSON input
    at /.yarn/cache/@octokit-request-npm-8.1.2-e350fab15b-769710b846.zip/node_modules/@octokit/request/dist-src/fetch-wrapper.js:97:11
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at requestWithGraphqlErrorHandling (/.yarn/__virtual__/@octokit-plugin-retry-virtual-913e8d7a91/0/cache/@octokit-plugin-retry-npm-6.0.1-b38996e6ff-2f5cd8b221.zip/node_modules/@octokit/plugin-retry/dist-src/wrap-request.js:20:20)
    at Job.doExecute (/.yarn/cache/bottleneck-npm-2.19.5-2c6092aa17-ffb9821852.zip/node_modules/bottleneck/light.js:405:18) my.command {"value":"my.extension.id","_lower":"my.extension.id"}

Code of Conduct

github-actions[bot] commented 5 months ago

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀