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 }); } }