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

SyntaxError: Unexpected end of JSON input #11

Open
sayhicoelho opened this issue May 6, 2023 · 0 comments
Open

SyntaxError: Unexpected end of JSON input #11

sayhicoelho opened this issue May 6, 2023 · 0 comments

Comments

@sayhicoelho
Copy link

I'm receiving an error from your SDK.

SyntaxError: Unexpected end of JSON input
  at JSON.parse (<anonymous>)
  at exports.XMLHttpRequest.xhr.onreadystatechange (/workspace/server/node_modules/ip-geolocation-api-javascript-sdk/IPGeolocationAPI.js:199:33)
  at exports.XMLHttpRequest.dispatchEvent (/workspace/server/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:591:25)
  at setState (/workspace/server/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:610:14)
  at IncomingMessage.<anonymous> (/workspace/server/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:447:13)
  at IncomingMessage.emit (node:events:525:35)
  at IncomingMessage.emit (node:domain:489:12)
  at endReadableNT (node:internal/streams/readable:1358:12)
  at processTicksAndRejections (node:internal/process/task_queues:83:21)

My API is crashing all the time and I can't catch this error since it is happening inside a callback:

image

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