Can anyone help me fix POST error http://localhost:9090/chats/ 500 (Internal Server Error) xhr.js:244

I use ReactJS to connect to NodeJS and call addChat. And here is my error. I spent all day but still can’t fix this error. Can anyone help me to fix this.

And this is my bug

type or paste code here

If you project is available on GitHub, that would allow us to clone your project and test it.