From a4c83dc82f1ad6ffd26f841c2fe40783994d8fe4 Mon Sep 17 00:00:00 2001 From: daniel31x13 Date: Tue, 12 Nov 2024 08:36:40 -0500 Subject: [PATCH] small fix --- pages/api/v1/tags/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/api/v1/tags/index.ts b/pages/api/v1/tags/index.ts index 3135001..58add22 100644 --- a/pages/api/v1/tags/index.ts +++ b/pages/api/v1/tags/index.ts @@ -10,6 +10,6 @@ export default async function tags(req: NextApiRequest, res: NextApiResponse) { const tags = await getTags({ userId: user.id, }); - return res.status(tags.status).json({ response: tags.response }); + return res.status(tags?.status || 500).json({ response: tags?.response }); } }