How to fix the error during the json.parse?

With form send data to the server (node.js) thus:
var data = {
 title: "some title",
 desc: "some desc"
var xhr = new XMLHttpRequest();"POST", "/add_movie", true);

Handle the reception of these data in this way:
var body = ";
 .on('readable', function() {
 body +=;
 .on('end', function() {
 try {
 body = JSON.parse(body);
 // further code
 } catch (err) {
 return new SystemError(500, err, 'routes/rk_after', 'Parsim JSON');


I get the data, I edit it as needed and it works fine.
This code can work correctly 200 times, and the 201-th to fail. Then again 150 everything will be smooth, and then again the error.

The error text:
Type: System error
 Status: 500
 Message: SyntaxError: Unexpected token o
 File: routes/rk_after
 Place: Parson JSON
 Stack: SyntaxError: Unexpected token o
 at Object.parse (native)
 at IncomingMessage.<anonymous> (/var/www/loststore/routes/rk_after.js:16:21)
 at emitNone (events.js:67:13)
 at IncomingMessage.emit (events.js:166:7)
 at endReadableNT (_stream_readable.js:913:12)
 at nextTickCallbackWith2Args (node.js:442:9)
 at process._tickCallback (node.js:356:17)</anonymous>

I.e. response error occurs in this place, the try fails and the catch is triggered.

I can't understand what determines the flight of this error. To test I inserted the same text into the form and many times had you sent it (the text is just figures 111). 300 times - normal flight, 301-th - error, again all good 220 - 221-St - error.

What's the problem?
July 9th 19 at 13:42

Find more questions by tags JSONNode.js