berstend/straightforward

Maximum call stack size exceeded

gunnypatel opened this issue · 1 comments

After a while, the server starts throwing the below error and stops handling requests.

RangeError: Maximum call stack size exceeded
(node:1) UnhandledPromiseRejectionWarning: RangeError: Maximum call stack size exceeded
    at exports.basics (/usr/local/lib/node_modules/straightforward/lib/middleware.js:9:18)
    at dispatch (/usr/local/lib/node_modules/straightforward/lib/utils.js:42:32)
    at exports.basics (/usr/local/lib/node_modules/straightforward/lib/middleware.js:17:10)
    at dispatch (/usr/local/lib/node_modules/straightforward/lib/utils.js:42:32)
    at exports.basics (/usr/local/lib/node_modules/straightforward/lib/middleware.js:17:10)
    at dispatch (/usr/local/lib/node_modules/straightforward/lib/utils.js:42:32)
    at exports.basics (/usr/local/lib/node_modules/straightforward/lib/middleware.js:17:10)
    at dispatch (/usr/local/lib/node_modules/straightforward/lib/utils.js:42:32)
    at exports.basics (/usr/local/lib/node_modules/straightforward/lib/middleware.js:17:10)
    at dispatch (/usr/local/lib/node_modules/straightforward/lib/utils.js:42:32)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 18870)
Exception in PromiseRejectCallback:
/usr/local/lib/node_modules/straightforward/lib/utils.js:44
        return Promise.reject(err)

Fixed :)