Update errors.

This commit is contained in:
2024-06-17 17:30:38 -04:00
parent 735311eee4
commit d441ca589d

View File

@@ -18,7 +18,7 @@ export default async function ({req, res, error}: Context){
if ( !PROJECT_ID || !API_KEY || !API_ENDPOINT) { if ( !PROJECT_ID || !API_KEY || !API_ENDPOINT) {
error('Environment not set'); error('Environment not set');
return {}; return res.send('Internal Error: Environment not set', 500);
} }
const client = new Client() const client = new Client()
.setEndpoint(API_ENDPOINT) .setEndpoint(API_ENDPOINT)
@@ -33,8 +33,6 @@ export default async function ({req, res, error}: Context){
path === 'userinfo' && path === 'userinfo' &&
validator.isByteLength(userId, { min: 1, max: 32 }) 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); const users = new Users(client);