commercetools / commercetools/launchpad-algolia-sync

Default post body size of express is too small for messages that can be sent

Open
#25 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
6
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Initializing express without specifying the size of the post body will have the size default to 100Kb but messages can be 256Kb before [payloadNotIncluded](https://docs.commercetools.com/api/projects/subscriptions#ctp:api:type:MessageDeliveryPayload) is used.

I suggest initializing express with a higher post payload body size allowence like: `app.use(bodyParser.json({ limit: '5mb' }));`

Did not check code if you are checking payloadNotIncluded to be false before accessing the item in the message but make sure you don't assume it will be.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.