hubotio / hubot

A customizable life embetterment robot.

Home Page:https://hubotio.github.io/hubot/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PayloadTooLargeError for json payload exceeds the default 100kb which can't be changed

andrii-kasparevych opened this issue · comments

Hi!
I've encountered a problem when I need to send a request to the bot with json payload that exceeds 100kb I get PayloadTooLargeError no matter what EXPRESS_LIMIT variable is set.
The reason for that is EXPRESS_LIMIT being ignored when creating json body parser here:
app.use(express.json())
Looks like a bug to be fixed. This line should probably be:
app.use(express.json({ limit: limit}))

Fixed with latest release.