Skip to content

Conversation

aarthika
Copy link

Fix for a scenario where the memcache JSON data was stored in a improper format resulting in an error shown as below which invokes an uncaught exception. This can be prevented by the given solution.
SyntaxError: Unexpected token x in JSON at position 0
at JSON.parse ()
at Socket.value (/memcached/lib/memcached.js:514:26)
at Client.rawDataReceived (/memcached/lib/memcached.js:744:51)
at Client.BufferBuffer (/memcached/lib/memcached.js:678:12)
at Socket.bowlofcurry (/memcached/lib/utils.js:126:15)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at addChunk (_stream_readable.js:250:12)
at readableAddChunk (_stream_readable.js:233:13)
at Socket.Readable.push (_stream_readable.js:195:10)
at TCP.onread (net.js:586:20)

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 this pull request may close these issues.

1 participant