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

Got an "Unexpected end of JSON input" error #62

Closed
PanJ opened this issue Mar 24, 2017 · 3 comments
Closed

Got an "Unexpected end of JSON input" error #62

PanJ opened this issue Mar 24, 2017 · 3 comments
Labels

Comments

@PanJ
Copy link
Contributor

PanJ commented Mar 24, 2017

Hi,

We got this Unexpected end of JSON input error in about 1% of the transaction. I have tried to investigate the library itself but could not find anything. I will try again with DEBUG_OMISE=true and wait for the issue to occur. I'm still not sure if the problem is the library itself or the response from the server is invalid JSON format.

Here's error message.

error:  SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at IncomingMessage.<anonymous> (/app/node_modules/omise/lib/api.js:20:23)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:188:7)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
@zdk
Copy link
Contributor

zdk commented Mar 24, 2017

Hi @PanJ
That could likely be non-completed response where network communication involved.
And, If you have found more details, please let's us know.
Thanks.

@wingyplus
Copy link
Contributor

What behavior should be when found json syntax error?

@varshard
Copy link
Contributor

varshard commented Jun 6, 2019

Close due to inactivity.

@varshard varshard closed this as completed Jun 6, 2019
@varshard varshard added the stale label Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants