accumulate-request plugin not working as expected

Added Accumulate-request in plugins sequence.

plugins:

sequence:

- oauth

- accumulate-request

- bunyan-logger

In bunyan-logger plugin implemented the onend_request as follows:

onend_request: function(req, res, data, next) {

log.debug('REQUEST PAYLOAD : ' + data.toString());

next(null, data); },

When i run the test, it accumulates once and fails to do the same again. The json request is not complete and the data passed to backend fails because of json parsing issue. When i run again the complete request goes in and works fine. Why is this inconsistent?

0 2 132
2 REPLIES 2

@srinandans

Do you have any suggestions if the implementation to include accumulate-request is not done properly?

Former Community Member
Not applicable

I don't think the "data" variable passes from one plugin to another. Why not combine the logic of accumulate-request and bunyan-logger into one plugin (bunyan-logger)?