NodeJs : TypeError: Converting circular structure to JSON

router/user.js

const mongoose = require('mongoose');
const express = require('express');
const router = express.Router();
const bodyparser = require('body-parser');
const bodyEncodedParser = bodyparser.json();
const {User,validate}=require('../models/users');


router.post('/',bodyEncodedParser,async(req,resp)=>{
    const {error} = validate(req.body);
    if (error) return resp.status(400).send(error.details[0].message);
//to check if user already not registered

    let user = await User.findOne({email : req.body.email});
    if(user) return resp.status(400).send("user already registered");

    user = new User({
        name :req.body.name,
        email :req.body.email,
        password :req.body.password
    });

    await user.save();

    resp.send(user);

});

module.exports =router;

models/users.js

const mongoose = require('mongoose');
const Joi = require('joi');


const User = mongoose.model('user', new mongoose.Schema({
    name  : {
        type : String,
        required:true,
        minlength : 5,
        maxlength : 50
    },
    email : {
        type:String,
        required:true,
        unique:true,
        minlength:5,
        maxlength:255
    },
    password : {
        type:String,
        required:true,
        minlength:8,
        maxlength:1024

    }

}));

function validateUser(user){
    const schema = {
        name : Joi.string().min(5).max(50).required(),
        email  : Joi.string().min(5).max(255).required().email(),
        password:Joi.string().min(5).max(255).required()
    };
    return Joi.validate(schema,user);
};

module.exports.User = User;
module.exports.validate=validateUser;

when i run the following from app.js and when i send a post request using postman i recive the following error


(node:5452) UnhandledPromiseRejectionWarning: TypeError: Converting circular structure to JSON
    at JSON.stringify (<anonymous>)
    at stringify (C:\Users\AMIT SINGH\Desktop\vidly\node_modules\express\lib\response.js:1119:12)
    at ServerResponse.json (C:\Users\AMIT SINGH\Desktop\vidly\node_modules\express\lib\response.js:260:14)
    at ServerResponse.send (C:\Users\AMIT SINGH\Desktop\vidly\node_modules\express\lib\response.js:158:21)
    at router.post (C:\Users\AMIT SINGH\Desktop\vidly\routes\users.js:12:40)
    at Layer.handle [as handle_request] (C:\Users\AMIT SINGH\Desktop\vidly\node_modules\express\lib\router\layer.js:95:5)
    at next (C:\Users\AMIT SINGH\Desktop\vidly\node_modules\express\lib\router\route.js:137:13)
    at jsonParser (C:\Users\AMIT SINGH\Desktop\vidly\node_modules\body-parser\lib\types\json.js:101:7)
    at Layer.handle [as handle_request] (C:\Users\AMIT SINGH\Desktop\vidly\node_modules\express\lib\router\layer.js:95:5)
    at next (C:\Users\AMIT SINGH\Desktop\vidly\node_modules\express\lib\router\route.js:137:13)
    at Route.dispatch (C:\Users\AMIT SINGH\Desktop\vidly\node_modules\express\lib\router\route.js:112:3)
    at Layer.handle [as handle_request] (C:\Users\AMIT SINGH\Desktop\vidly\node_modules\express\lib\router\layer.js:95:5)
    at C:\Users\AMIT SINGH\Desktop\vidly\node_modules\express\lib\router\index.js:281:22
    at Function.process_params (C:\Users\AMIT SINGH\Desktop\vidly\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\AMIT SINGH\Desktop\vidly\node_modules\express\lib\router\index.js:275:10)
    at Function.handle (C:\Users\AMIT SINGH\Desktop\vidly\node_modules\express\lib\router\index.js:174:3)
(node:5452) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:5452) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

what i want to achive is when i sent a post request with name email and password. if no email is there. a new email is added. but it gives me following error

couldn’t find the solution?