diff --git a/api/src/services/report/smsparser.js b/api/src/services/report/smsparser.js index dee6288fec8..a06f69bbe40 100644 --- a/api/src/services/report/smsparser.js +++ b/api/src/services/report/smsparser.js @@ -216,7 +216,7 @@ const fieldParsers = { if (formattedAndValidatedPhone) { return formattedAndValidatedPhone; } else { - logger.error(`The provided phone number ${raw} is invalid`); + logger.warn(`The provided phone number ${raw} is invalid`); return null; } } diff --git a/api/tests/mocha/services/report/smsparser.spec.js b/api/tests/mocha/services/report/smsparser.spec.js index a5f37c9a6f4..6fd5f5a112c 100644 --- a/api/tests/mocha/services/report/smsparser.spec.js +++ b/api/tests/mocha/services/report/smsparser.spec.js @@ -146,7 +146,7 @@ describe('sms parser', () => { [['NP 20 +918750660880 Prajwol', '+918750660880'], ['NP 20 +254773087889 Prajwol', '+254773087889'], ['NP 20 +255712262987 Prajwol', '+255712262987']].forEach(phoneNumerWithParsed => { - it('returns parsed number if valid phone of another the region', () => { + it(`returns parsed number if valid phone of another the region: ${phoneNumerWithParsed[0]}`, () => { const doc = { message: phoneNumerWithParsed[0] }; const def = definitions.forms.NP; sinon.stub(config, 'getAll').returns({