remove supererror, not really used

This commit is contained in:
Girish Ramakrishnan
2022-02-21 17:34:51 -08:00
parent 24a16cf8b4
commit ba5c2f623c
4 changed files with 2 additions and 64 deletions

View File

@@ -686,7 +686,7 @@ async function notifyLoginLocation(user, ip, userAgent, auditSource) {
if (constants.TEST && ip === '127.0.0.1') return;
const response = await superagent.get('https://geolocation.cloudron.io/json').query({ ip }).ok(() => true);
if (response.statusCode !== 200) return console.error(`Failed to get geoip info. statusCode: ${response.statusCode}`);
if (response.statusCode !== 200) return debug(`Failed to get geoip info. statusCode: ${response.statusCode}`);
const country = safe.query(response.body, 'country.names.en', '');
const city = safe.query(response.body, 'city.names.en', '');