diff --git a/packages/server/src/fastify/plugin.ts b/packages/server/src/fastify/plugin.ts index 4b86eec4b..02f5f341a 100644 --- a/packages/server/src/fastify/plugin.ts +++ b/packages/server/src/fastify/plugin.ts @@ -50,7 +50,7 @@ const pluginHandler: FastifyPluginCallback = (fastify, options, d const prisma = (await options.getPrisma(request, reply)) as DbClientContract; if (!prisma) { reply.status(500).send({ message: 'unable to get prisma from request context' }); - return; + return reply; } try { @@ -68,6 +68,8 @@ const pluginHandler: FastifyPluginCallback = (fastify, options, d } catch (err) { reply.status(500).send({ message: `An unhandled error occurred: ${err}` }); } + + return reply; }); done();