From 1dba08120ac53cda172923f7ea352a9928621ccc Mon Sep 17 00:00:00 2001 From: cuixiaorui Date: Sat, 6 Jul 2024 18:29:36 +0800 Subject: [PATCH] chore: Add error logging to checkMembershipHandler --- packages/api-hub/src/routes/membership/handler.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/api-hub/src/routes/membership/handler.ts b/packages/api-hub/src/routes/membership/handler.ts index 2497bbdf..ac7b3a50 100644 --- a/packages/api-hub/src/routes/membership/handler.ts +++ b/packages/api-hub/src/routes/membership/handler.ts @@ -1,5 +1,6 @@ import { FastifyReply, FastifyRequest } from "fastify"; +import { logger } from "../../services/logger"; import { checkMembership } from "./service"; export async function checkMembershipHandler( @@ -11,6 +12,7 @@ export async function checkMembershipHandler( const membershipStatus = await checkMembership(userId); reply.send(membershipStatus); } catch (error) { + logger.error(error); reply.status(500).send({ error: "Internal Server Error" }); } }