Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

195
Views
Dynamoose error when calling create

I am using node js and dynamoose to interact with dynamodb. When I try to create a new object Dynamo returns this error. The problem is not with what is coming in on the request, but with dynamoose. The function that is being hit starts at line 5. The error is caused by invoking the function create() on line 6. I have checked the model prototype and it does contain the create function.

'use strict';
  2
  3   const Aircraft = require('../../aircraft.dynamo/index');
  4
  5   function createAircraft(req, res, next) {
  6     Aircraft.create(req.body, (aircraft) => {
  7       return res.status(201).json(aircraft);
  8     });
  9   }
 10
 11   module.exports = createAircraft;

TypeError: Cannot read property 'name' of undefined
            <br> &nbsp; &nbsp;at NewModel.Model.put (/Users/chrisrijos/SideProjects/aircraft-api/node_modules/dynamoose/lib/Model.js:202:72)
            <br> &nbsp; &nbsp;at Function.Model.create (/Users/chrisrijos/SideProjects/aircraft-api/node_modules/dynamoose/lib/Model.js:247:16)
            <br> &nbsp; &nbsp;at Function.NewModel.create (/Users/chrisrijos/SideProjects/aircraft-api/node_modules/dynamoose/lib/Model.js:99:18)
            <br> &nbsp; &nbsp;at createAircraft (/Users/chrisrijos/SideProjects/aircraft-api/server/api/Aircraft/aircraft.controller/createAircraft/index.js:6:14)
            <br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/Users/chrisrijos/SideProjects/aircraft-api/node_modules/express/lib/router/layer.js:95:5)
            <br> &nbsp; &nbsp;at next (/Users/chrisrijos/SideProjects/aircraft-api/node_modules/express/lib/router/route.js:137:13)
            <br> &nbsp; &nbsp;at Route.dispatch (/Users/chrisrijos/SideProjects/aircraft-api/node_modules/express/lib/router/route.js:112:3)
            <br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/Users/chrisrijos/SideProjects/aircraft-api/node_modules/express/lib/router/layer.js:95:5)
            <br> &nbsp; &nbsp;at /Users/chrisrijos/SideProjects/aircraft-api/node_modules/express/lib/router/index.js:281:22
            <br> &nbsp; &nbsp;at Function.process_params (/Users/chrisrijos/SideProjects/aircraft-api/node_modules/express/lib/router/inde
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!