500
Server Error!
CastError: Cast to ObjectId failed for value "forgotPassword" (type string) at path "_id" for model "User"
at model.Query.exec (/home/mamtas_talha/yokaya-backend/node_modules/mongoose/lib/query.js:4498:21)
at Query.exec (/home/mamtas_talha/yokaya-backend/node_modules/mongoose-deep-populate/lib/plugin.js:50:22)
at model.Query.exec (/home/mamtas_talha/yokaya-backend/node_modules/mongoose-cache/lib/cache.js:27:24)
at mongoose.Query.exec (/home/mamtas_talha/yokaya-backend/node_modules/mongoose-cache/lib/cache.js:84:15)
at Function.load (/home/mamtas_talha/yokaya-backend/app/models/user.js:395:22)
at exports.load (/home/mamtas_talha/yokaya-backend/app/controllers/users.js:28:9)
at paramCallback (/home/mamtas_talha/yokaya-backend/node_modules/express/lib/router/index.js:415:7)
at param (/home/mamtas_talha/yokaya-backend/node_modules/express/lib/router/index.js:395:5)
at Function.process_params (/home/mamtas_talha/yokaya-backend/node_modules/express/lib/router/index.js:421:3)
at next (/home/mamtas_talha/yokaya-backend/node_modules/express/lib/router/index.js:280:10)
at Controller.checkCompanyStatus (/home/mamtas_talha/yokaya-backend/app/controllers/Controller.js:597:13)
at Layer.handle [as handle_request] (/home/mamtas_talha/yokaya-backend/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/mamtas_talha/yokaya-backend/node_modules/express/lib/router/index.js:328:13)
at /home/mamtas_talha/yokaya-backend/node_modules/express/lib/router/index.js:286:9
at Function.process_params (/home/mamtas_talha/yokaya-backend/node_modules/express/lib/router/index.js:346:12)
at next (/home/mamtas_talha/yokaya-backend/node_modules/express/lib/router/index.js:280:10)
at /home/mamtas_talha/yokaya-backend/config/routes.js:206:5
at Layer.handle [as handle_request] (/home/mamtas_talha/yokaya-backend/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/mamtas_talha/yokaya-backend/node_modules/express/lib/router/index.js:328:13)
at /home/mamtas_talha/yokaya-backend/node_modules/express/lib/router/index.js:286:9
at Function.process_params (/home/mamtas_talha/yokaya-backend/node_modules/express/lib/router/index.js:346:12)
at next (/home/mamtas_talha/yokaya-backend/node_modules/express/lib/router/index.js:280:10)
at conditionalCSRF (/home/mamtas_talha/yokaya-backend/config/routes.js:180:9)
at Layer.handle [as handle_request] (/home/mamtas_talha/yokaya-backend/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/mamtas_talha/yokaya-backend/node_modules/express/lib/router/index.js:328:13)
at /home/mamtas_talha/yokaya-backend/node_modules/express/lib/router/index.js:286:9
at Function.process_params (/home/mamtas_talha/yokaya-backend/node_modules/express/lib/router/index.js:346:12)
at next (/home/mamtas_talha/yokaya-backend/node_modules/express/lib/router/index.js:280:10)