diff --git a/src/auth.ts b/src/auth.ts
index d92dd75..359cabf 100644
--- a/src/auth.ts
+++ b/src/auth.ts
@@ -6,6 +6,8 @@ const API_ENDPOINT = 'https://discord.com/api/v6';
const axios = require('axios').default;
export function run(app) {
+ const logger = app.get('logger');
+
app.get('/discordauth', async (req, res) => {
const code = req.query.code;
@@ -57,6 +59,8 @@ export function run(app) {
res.send(`hi ${userInfo.data.username}#${userInfo.data.discriminator}
![](https://media.discordapp.net/avatars/${userInfo.data.id}/${userInfo.data.avatar}.png)
ur useruuid is ${userUuid}`);
} catch(err) {
res.send(`whoooops
${err}`);
+ console.error(err);
+ logger.error(err);
}
} else {
const url = `http://${req.headers.host}/discordauth`;