You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prevent from server down when request body has nothing
How to reproduce
- Build a bot with 'botbuilder' and 'express'
- Send a request without body
- Server down
Sample request:
% curl -X POST http://localhost:3978/api/messages
Stack trace
SyntaxError: Unexpected end of JSON input
at Object.parse (native)
at IncomingMessage.<anonymous> (botbuilder/lib/bots/ChatConnector.js:43:37)
at emitNone (events.js:86:13)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:975:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
Reference:
https://nodejs.org/en/docs/guides/anatomy-of-an-http-transaction/#header-request-body
0 commit comments