Pavan Kumar
12/11/2021, 4:32 AMnew Api
with bunch or routes. It worked fine. I have been adding new routes to it, it was fine till yesterday!
Yesterday, I added new route and that one route is throwing the error. I don't know why!!!?
So here is the example of routes which are working.
'GET /users': `${SERVICE_PATH}/users/listUsers/listUsers.handler`,
'GET /users/{userid}': `${SERVICE_PATH}/users/getUser/getUser.handler`,
'DELETE /users/{userid}': `${SERVICE_PATH}/users/removeUser/removeUser.handler`,
'PUT /users/{userid}': `${SERVICE_PATH}/users/updateUser/updateUser.handler`,
'POST /users': `${SERVICE_PATH}/users/createUser/createUser.handler`,
Now I add one more route to it. (Just to confirm i don't have bug in my handler in have used same handler as in GET /users
)
'GET /subscriptions': `${SERVICE_PATH}/users/listUsers/listUsers.handler`,
Now when I access the route GET /subscriptions
I get following error.
7a0a127b-a947-47d0-ae12-6a14d47ccb6c REQUEST pavan-someProject--AuthorizerBD825682-clNfJSVK9mGZ [packages/apps/someProject/services/gateway/auth.authorize] invoked by API GET /subscriptions
7a0a127b-a947-47d0-ae12-6a14d47ccb6c ERROR Error [TypeError]: Cannot read property 'list' of undefined
at deserializeError (/Users/pavan/MyProgs/someProject/monorepo/node_modules/@serverless-stack/cli/lib/serializeError.js:71:22)
at printLambdaResponse (/Users/pavan/MyProgs/someProject/monorepo/node_modules/@serverless-stack/cli/scripts/start.js:1457:24)
at /Users/pavan/MyProgs/someProject/monorepo/node_modules/@serverless-stack/cli/scripts/start.js:1363:7
at processTicksAndRejections (internal/process/task_queues.js:95:5)
Pavan Kumar
12/11/2021, 4:48 AMsst/cli
to get exact error
} else if (lambdaResponse.type === "failure") {
console.log(lambdaResponse);
Frank
Frank
Frank
Pavan Kumar
12/13/2021, 2:01 PMPavan Kumar
12/13/2021, 2:01 PM