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
By default we're using lodash each function to iterate over actions of the endpoints and using async function as a callback, to run promises inside this.
When iterating through node inspect mode, I couldn't find any issue but, when running through an actual npm start I've received the following error:
By default lodash each iteraction doesn't wait for callback function async to finish and may cause inconsistencies like the following:
(node:84929) 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(). (rejection id: 24)
(node:84929) UnhandledPromiseRejectionWarning: TypeError: undefined is not a function
at /Users/yagiz/Workspace/alfred/node_modules/koa-ts-controllers/dist/util/generateRoutes.js:110:32
at /Users/yagiz/Workspace/alfred/node_modules/lodash/lodash.js:4905:15
at baseForOwn (/Users/yagiz/Workspace/alfred/node_modules/lodash/lodash.js:2990:24)
at /Users/yagiz/Workspace/alfred/node_modules/lodash/lodash.js:4874:18
at Function.forEach (/Users/yagiz/Workspace/alfred/node_modules/lodash/lodash.js:9342:14)
at _generateEndPoints (/Users/yagiz/Workspace/alfred/node_modules/koa-ts-controllers/dist/util/generateRoutes.js:80:22)
at /Users/yagiz/Workspace/alfred/node_modules/koa-ts-controllers/dist/util/generateRoutes.js:143:19
at /Users/yagiz/Workspace/alfred/node_modules/lodash/lodash.js:4905:15
at baseForOwn (/Users/yagiz/Workspace/alfred/node_modules/lodash/lodash.js:2990:24)
at /Users/yagiz/Workspace/alfred/node_modules/lodash/lodash.js:4874:18
at Function.forEach (/Users/yagiz/Workspace/alfred/node_modules/lodash/lodash.js:9342:14)
at Object.generateRoutes (/Users/yagiz/Workspace/alfred/node_modules/koa-ts-controllers/dist/util/generateRoutes.js:140:22)
at Object.exports.bootstrapControllers (/Users/yagiz/Workspac
The text was updated successfully, but these errors were encountered:
anonrig
added a commit
to anonrig/koa-ts-controllers
that referenced
this issue
Feb 4, 2020
By default we're using lodash each function to iterate over actions of the endpoints and using async function as a callback, to run promises inside this.
When iterating through node inspect mode, I couldn't find any issue but, when running through an actual
npm start
I've received the following error:By default lodash each iteraction doesn't wait for callback function async to finish and may cause inconsistencies like the following:
https://github.com/iyobo/koa-ts-controllers/blob/master/src/util/generateRoutes.ts#L94
The text was updated successfully, but these errors were encountered: