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 while receiving an empty response body #11

Open
Akitsu opened this issue Nov 23, 2023 · 0 comments · May be fixed by #13
Open

Unexpected end of JSON input while receiving an empty response body #11

Akitsu opened this issue Nov 23, 2023 · 0 comments · May be fixed by #13

Comments

@Akitsu
Copy link

Akitsu commented Nov 23, 2023

The error below occurs when you receive a response without a body, such as a 204 response code.
Most likely, this is caused by response.json()

SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at parseJSONFromBytes (node:internal/deps/undici/undici:4553:19) at successSteps (node:internal/deps/undici/undici:4527:27) at specConsumeBody (node:internal/deps/undici/undici:4533:9) at _Response.json (node:internal/deps/undici/undici:4425:18) at defaultFetcher (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected]/node_modules/zod-fetch/dist/index.mjs:12:21) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

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

Successfully merging a pull request may close this issue.

1 participant