Closed dominicarrojado closed 7 years ago
SyntaxError: Unexpected string W20160602-14:38:26.918(8)? (STDERR) at Object.parse (native) W20160602-14:38:26.918(8)? (STDERR) at parse (/Users/HashtagLabs/.meteor/packages/iron_router/.1.0.12.1y9lcni++os+web.browser+web.cordova/npm/node_modules/body-parser/lib/types/json.js:84:17) W20160602-14:38:26.918(8)? (STDERR) at /Users/HashtagLabs/.meteor/packages/iron_router/.1.0.12.1y9lcni++os+web.browser+web.cordova/npm/node_modules/body-parser/lib/read.js:102:18 W20160602-14:38:26.918(8)? (STDERR) at done (/Users/HashtagLabs/.meteor/packages/iron_router/.1.0.12.1y9lcni++os+web.browser+web.cordova/npm/node_modules/body-parser/node_modules/raw-body/index.js:248:14) W20160602-14:38:26.919(8)? (STDERR) at IncomingMessage.onEnd (/Users/HashtagLabs/.meteor/packages/iron_router/.1.0.12.1y9lcni++os+web.browser+web.cordova/npm/node_modules/body-parser/node_modules/raw-body/index.js:294:7) W20160602-14:38:26.919(8)? (STDERR) at IncomingMessage.g (events.js:180:16) W20160602-14:38:26.919(8)? (STDERR) at IncomingMessage.emit (events.js:92:17) W20160602-14:38:26.919(8)? (STDERR) at _stream_readable.js:944:16 W20160602-14:38:26.919(8)? (STDERR) at process._tickDomainCallback (node.js:502:13)
how to catch this error, e.g. when calling an API [POST] with an unexpected string in the object body?
what does your code look like?
how to catch this error, e.g. when calling an API [POST] with an unexpected string in the object body?