Wednesday, 10 May 2017

TypeError: Cannot read property 'send' of undefined

i am trying to send a response from my controller. i am using my custom class. in this class i was created my custom response and just call it in controller. when i am trying to get the response by get method. it will through the typeError. i am using modules Restify, Sequelize, JWT, isValid for token based authentication.`/home/kspx/Desktop/MyData/Projects/Node/login-master/common/login_response.js:44 this.response.send(responseBody); ^

TypeError: Cannot read property 'send' of undefined at LoginResponse.send (/home/kspx/Desktop/MyData/Projects/Node/login-master/common/login_response.js:44:21) at validUser (/home/kspx/Desktop/MyData/Projects/Node/login-master/v3/controller/validController.js:15:10) at Object. (/home/kspx/Desktop/MyData/Projects/Node/login-master/v3/controller/validController.js:30:18) at Module._compile (module.js:410:26) at Object.Module._extensions..js (module.js:417:10) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Module.require (module.js:354:17) at require (internal/module.js:12:17) at Object. (/home/kspx/Desktop/MyData/Projects/Node/login-master/app.js:10:15) at Module._compile (module.js:410:26) at Object.Module._extensions..js (module.js:417:10) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Function.Module.runMain (module.js:442:10) at startup (node.js:136:18) `



via Nainesh Raval

No comments:

Post a Comment