#Weird exception on base-exception-filter.js

6 messages · Page 1 of 1 (latest)

little steeple
#

Hi. I created a nest project and every time the app throws an unhandled exception, i get an error from inside the base-exception-filter implemented in the @edgy ingot/core package. I went to the filter file and tried logging the applicationRef variable, but it doesn't have an isHeadersSent method, and this is the cause of this error.

On the other hand, i tried logging the error body defined on the same function, and got an Internal Server Error message, and a status 500, because it doesn't enter the verification this.isHttpError(exception)

I can't debug my app properly, and every time this happens it kills the request (Error: socket hang up) and i need to manually reload it or change some file. Is this a known issue?

An example can be found at https://github.com/franco-dias/nestjs-exception-troubleshooting

By installing the dependencies and performing a @GET request to http://localhost:3000/users, it tries to send an email, and due to misconfiguration in the template property at app.module.ts it throws an unhandled exception, but everyting that's logged into the console is the error shown in the screenshot attached, and the request dies.

Is this a known issue? Do i need to setup something to catch these exceptions?

GitHub

Contribute to franco-dias/nestjs-exception-troubleshooting development by creating an account on GitHub.

visual trellis
#

That’s due to version mismatch

#

Upgrade your packages, my friend

#

You’re using an old version of platform-express

#

As you’re using v9 for all the others @nestjs/*, I don’t see any reason to stay in v8

little steeple
#

Hey, thanks for replying!
That's weird, since i don't remember specifying the version on package installation