curtail massive log msg (#242)

This commit is contained in:
Dave Horton
2026-04-23 07:35:27 -04:00
committed by GitHub
parent cecdbdccef
commit cd48675499
+14 -4
View File
@@ -394,8 +394,13 @@ module.exports = (srf, logger) => {
} }
} }
if (r.length > 1) { if (r.length > 1) {
logger.info({r}, const all = r.map(({account_sid, voip_carrier_sid}) => ({account_sid, voip_carrier_sid}));
'multiple carriers with the same gateway have the same number provisioned for the same account' logger.info({
number: r[0].number,
total: all.length,
matches: all.slice(0, 5)
},
'multiple carriers with the same gateway have the same number provisioned for the same account'
+ ' -- cannot determine which one to use'); + ' -- cannot determine which one to use');
return { return {
fromCarrier: true, fromCarrier: true,
@@ -601,8 +606,13 @@ module.exports = (srf, logger) => {
} }
} }
else if (r.length > 1) { else if (r.length > 1) {
logger.info({r}, const all = r.map(({account_sid, voip_carrier_sid}) => ({account_sid, voip_carrier_sid}));
'multiple accounts have added this carrier with default routing -- cannot determine which to use'); logger.info({
number: r[0].number,
total: all.length,
matches: all.slice(0, 5)
},
'multiple accounts have added this carrier with default routing -- cannot determine which to use');
return { return {
fromCarrier: true, fromCarrier: true,
error: 'Multiple accounts are attempting to route the same phone number from the same carrier' error: 'Multiple accounts are attempting to route the same phone number from the same carrier'