iron-meteor / iron-router

A client and server side router designed specifically for Meteor.
MIT License
1.98k stars 413 forks source link

Iron Router API #1539

Closed dominicarrojado closed 7 years ago

dominicarrojado commented 8 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?

chrisbutler commented 7 years ago

what does your code look like?

chrisbutler commented 7 years ago

what does your code look like?