diff --git a/lib/db-utils.js b/lib/db-utils.js index 29a6311..1d8d657 100644 --- a/lib/db-utils.js +++ b/lib/db-utils.js @@ -394,8 +394,13 @@ module.exports = (srf, logger) => { } } if (r.length > 1) { - logger.info({r}, - 'multiple carriers with the same gateway have the same number provisioned for the same account' + const all = r.map(({account_sid, voip_carrier_sid}) => ({account_sid, voip_carrier_sid})); + 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'); return { fromCarrier: true, @@ -601,8 +606,13 @@ module.exports = (srf, logger) => { } } else if (r.length > 1) { - logger.info({r}, - 'multiple accounts have added this carrier with default routing -- cannot determine which to use'); + const all = r.map(({account_sid, voip_carrier_sid}) => ({account_sid, voip_carrier_sid})); + 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 { fromCarrier: true, error: 'Multiple accounts are attempting to route the same phone number from the same carrier'