Skip to content

Commit

Permalink
chore: Add error logging to checkMembershipHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
cuixiaorui committed Jul 6, 2024
1 parent 4efb76a commit 1dba081
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/api-hub/src/routes/membership/handler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { FastifyReply, FastifyRequest } from "fastify";

import { logger } from "../../services/logger";
import { checkMembership } from "./service";

export async function checkMembershipHandler(
Expand All @@ -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" });
}
}

0 comments on commit 1dba081

Please sign in to comment.