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 #453

Open
ianrenton opened this issue Dec 22, 2022 · 0 comments
Open

Unexpected End of JSON Input #453

ianrenton opened this issue Dec 22, 2022 · 0 comments

Comments

@ianrenton
Copy link

ianrenton commented Dec 22, 2022

Hi,

I am occasionally seeing the following stacktrace in my Staticman server logs, resulting in an HTTP 400 response to the frontend and a comment that fails to post. I haven't dived into Staticman's source code before, so before I do I thought I'd ask if anyone else has seen this, and knows whether the JSON that it's referencing is likely to be from the user end, or from Github or Akismet? Unfortunately Staticman doesn't log the problematic JSON string itself.

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at parse (/workspace/node_modules/body-parser/lib/types/json.js:89:19)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
    at endReadableNT (node:internal/streams/readable:1358:12)
    at IncomingMessage.emit (node:domain:489:12)
    at IncomingMessage.emit (node:events:525:35)
    at IncomingMessage.onEnd (/workspace/node_modules/raw-body/index.js:280:7)
    at done (/workspace/node_modules/raw-body/index.js:220:7)
    at invokeCallback (/workspace/node_modules/raw-body/index.js:231:16)
    at AsyncResource.runInAsyncScope (node:async_hooks:203:9)
    at /workspace/node_modules/body-parser/lib/read.js:128:18

Thanks

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

1 participant