Skip to content

mongoose error #3

@Xiscollado

Description

@Xiscollado

Hi Jeff,
First of all, your book is awesome, i´m learning a lot.

I have a problem setting up the POST of the username and body as you say in the chapter "Using Mongoose Models with POST Endpoint"

i´m using postman and i get this...

ValidationError: Path body is required., Path username is required.
at model.Document.invalidate (/Users/xiscollado/Desktop/webprojects/node/node_modules/mongoose/lib/document.js:1021:32)
at /Users/xiscollado/Desktop/webprojects/node/node_modules/mongoose/lib/document.js:970:16
at validate (/Users/xiscollado/Desktop/webprojects/node/node_modules/mongoose/lib/schematype.js:610:7)
at /Users/xiscollado/Desktop/webprojects/node/node_modules/mongoose/lib/schematype.js:627:9
at Array.forEach (native)
at SchemaString.SchemaType.doValidate (/Users/xiscollado/Desktop/webprojects/node/node_modules/mongoose/lib/schematype.js:614:19)
at /Users/xiscollado/Desktop/webprojects/node/node_modules/mongoose/lib/document.js:968:9

any clues?
Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions