nestjs / nest

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript 🚀
https://nestjs.com
MIT License
67.74k stars 7.63k forks source link

Requests timeout and errors not caught #351

Closed mogusbi closed 6 years ago

mogusbi commented 6 years ago

I'm submitting a...


[ ] Regression 
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

I have started a Mongoose based application that is pretty much based on the mongoose demo from the documentation.

Unfortunately I am unable to get the two endpoints on my application ([GET / POST] /api/1.0/role) to return anything. The GET endpoint just times out whist the POST endpoint will either timeout if something is created or will return a 500 error and will output an unhandled promise error if something goes wrong (such as a duplicate entry)

Minimal reproduction of the problem with instructions

You can find the repo at https://bitbucket.org/mogusbi/breeze-bb/

After cloning, run npm run api:start and use something like Postman to hit http://localhost:8080/api/1.0/role with a POST request with the following payload;

{
    "name": "System",
    "protect": true
}

Environment


- Node version: 8.2.1
- Platform:  Mac OS 10.13.2

├── @nestjs/common@4.5.8
├── @nestjs/core@4.5.8
├── @nestjs/mongoose@2.0.0
├── @nestjs/swagger@1.1.3
├── @types/body-parser@1.16.8
├── @types/mongoose@4.7.32
├── @types/morgan@1.7.35
├── @types/node@8.5.8
├── body-parser@1.18.2
├── mongoose@4.13.9
├── morgan@1.9.0
├── nodemon@1.14.11
├── reflect-metadata@0.1.10
├── rxjs@5.5.6
├── ts-node@4.1.0
└── typescript@2.6.2
kamilmysliwiec commented 6 years ago

Hi @mogusbi. Please update your version into 4.5.9.

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.