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