You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I'm using nestjs-prisma in an application, and I have an e2e test failing when an exception is launched because the applicationRef inside this lib is undefined.
Steps to reproduce:
Write an e2e test where you expect an exception to be raised using the findFirstOrThrow inside a nest service and call it through the controller.
Expected behavior:
The test passes without issues.
What is happening:
The exception is properly raised, however, the applicationRef is undefined making the test hang with:
TypeError: Cannot read properties of undefined (reading 'isHeadersSent')
at PrismaClientExceptionFilter.catch (node_modules/@nestjs/core/exceptions/base-exception-filter.js:27:29)
at PrismaClientExceptionFilter.catchClientKnownRequestError (node_modules/nestjs-prisma/lib/prisma-client-exception.filter.ts:88:6)
at PrismaClientExceptionFilter.catch (node_modules/nestjs-prisma/lib/prisma-client-exception.filter.ts:69:4)
at ExceptionsHandler.invokeCustomFilters (node_modules/@nestjs/core/exceptions/exceptions-handler.js:33:26)
at ExceptionsHandler.next (node_modules/@nestjs/core/exceptions/exceptions-handler.js:13:18)
at node_modules/@nestjs/core/router/router-proxy.js:13:35
This issue does not happen in runtime.
Here is a thread on the NestJS discord server discussing about this bug.
The text was updated successfully, but these errors were encountered:
Hello,
I'm using nestjs-prisma in an application, and I have an e2e test failing when an exception is launched because the
applicationRef
inside this lib isundefined
.Steps to reproduce:
findFirstOrThrow
inside a nest service and call it through the controller.Expected behavior:
The test passes without issues.
What is happening:
The exception is properly raised, however, the
applicationRef
is undefined making the test hang with:This issue does not happen in runtime.
Here is a thread on the NestJS discord server discussing about this bug.
The text was updated successfully, but these errors were encountered: