Skip to content

Commit

Permalink
fix: log the IP in case of alt IP errors
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinKolarik committed Jan 20, 2025
1 parent c7995c6 commit 8b5a641
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lib/alt-ips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ export class AltIps {
}
} catch (e) {
if (e instanceof ProbeError) {
logger.warn('Failed to add an alt IP.', e);
logger.warn('Failed to add an alt IP.', e, { ip });
} else {
logger.error('Failed to add an alt IP.', e);
logger.error('Failed to add an alt IP.', e, { ip });
}

return false;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/geoip/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default class GeoIpClient {
const isProxy = (ip2location?.isProxy && !isAddrWhitelisted(addr)) ?? null;

if (isProxy) {
throw new ProbeError('vpn detected');
throw new ProbeError(`vpn detected: ${addr}`);
}

if (resultsWithCities.length === 0 || (resultsWithCities.length === 1 && resultsWithCities[0]?.provider === 'fastly')) {
Expand Down

0 comments on commit 8b5a641

Please sign in to comment.