From d441ca589d17c4c0ce755fefd868130815a493b0 Mon Sep 17 00:00:00 2001 From: Patrick Toal Date: Mon, 17 Jun 2024 17:30:38 -0400 Subject: [PATCH] Update errors. --- functions/userinfo/src/main.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/functions/userinfo/src/main.ts b/functions/userinfo/src/main.ts index 8892dfb..87f0036 100644 --- a/functions/userinfo/src/main.ts +++ b/functions/userinfo/src/main.ts @@ -18,7 +18,7 @@ export default async function ({req, res, error}: Context){ if ( !PROJECT_ID || !API_KEY || !API_ENDPOINT) { error('Environment not set'); - return {}; + return res.send('Internal Error: Environment not set', 500); } const client = new Client() .setEndpoint(API_ENDPOINT) @@ -33,8 +33,6 @@ export default async function ({req, res, error}: Context){ path === 'userinfo' && validator.isByteLength(userId, { min: 1, max: 32 }) ) { - // Send a response with the res object helpers - // `res.send()` dispatches a string back to the client const users = new Users(client);