Closed liaosankai closed 2 years ago
@liaosankai thanks for reporting this issue. I haven't used it with fastify yet, but makes sense that you receive the error as the filter uses Response
from express https://github.com/notiz-dev/nestjs-prisma/blob/main/lib/prisma-client-exception.filter.ts#L4.
We should add an exception filter for fastify for examle PrismaClientFasitfyExceptionFilter
. Here is an example how to get and manipulate the response for fastify.
Do you want to add this filter for fastify in a PR? Happy to help out.
I got error
response.status(...).json is not a function
in PrismaClientExceptionFilter if I use FastifyAdapter as my app. How about compatible with fastify?