I'm using Firebase function Http trigger (POST) request. Few requests are failing with below issue.
I understand some problem with JSON body parser, but don't know how to identify the exact POST request which is failing like this.
textPayload: "SyntaxError: Unexpected token
in JSON at position 274
at Object.parse (native)
at parse (/var/tmp/worker/node_modules/body-parser/lib/types/json.js:84:17)
at /var/tmp/worker/node_modules/body-parser/lib/read.js:102:18
at IncomingMessage.onEnd (/var/tmp/worker/node_modules/raw-body/index.js:149:7)
at IncomingMessage.g (events.js:291:16)
at emitNone (events.js:86:13)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickDomainCallback (internal/process/next_tick.js:122:9)"
Execution log of the above issue,
Function execution took 68 ms, finished with status code: 400
warning <SyntaxError: Unexpected token in JSON at position 274 at Object.parse (native) at parse.....>
Function execution started
Kindly help me on this..
via Karthi R
No comments:
Post a Comment