SyntaxError: Unexpected token u
at Object.parse (native)
at Object.createEvent (/app/api/event.js:28:20)
at module.exports (/app/api/web.js:213:9)
at callbacks (/app/node_modules/express/lib/router/index.js:161:37)
at param (/app/node_modules/express/lib/router/index.js:135:11)
at pass (/app/node_modules/express/lib/router/index.js:142:5)
at nextRoute (/app/node_modules/express/lib/router/index.js:100:7)
at callbacks (/app/node_modules/express/lib/router/index.js:164:11)
at app.post.user (/app/api/web.js:123:3)
at callbacks (/app/node_modules/express/lib/router/index.js:161:37)
Trying to create an event and get a 500 error.
I am passing this object through POST:
partyEvent:{"name":"jerry test","userId":7,"eventDate":"2013-06-06"}
response:
SyntaxError: Unexpected token u at Object.parse (native) at Object.createEvent (/app/api/event.js:28:20) at module.exports (/app/api/web.js:213:9) at callbacks (/app/node_modules/express/lib/router/index.js:161:37) at param (/app/node_modules/express/lib/router/index.js:135:11) at pass (/app/node_modules/express/lib/router/index.js:142:5) at nextRoute (/app/node_modules/express/lib/router/index.js:100:7) at callbacks (/app/node_modules/express/lib/router/index.js:164:11) at app.post.user (/app/api/web.js:123:3) at callbacks (/app/node_modules/express/lib/router/index.js:161:37)