diff --git a/src/core/verifyUserIdentity.js b/src/core/verifyUserIdentity.js index 144cc72aaaa687102e747662126fcc001e944ad7..3ee35cf94546a6fe9c8961c097e041af294377db 100644 --- a/src/core/verifyUserIdentity.js +++ b/src/core/verifyUserIdentity.js @@ -28,8 +28,8 @@ async function verifyUserIdentity( isAlternateStart = false, inseeCode = '' ) { - // If first start get InseeCode log('debug', 'verifyUserIdentity') + // If first start get InseeCode if (!isAlternateStart) { inseeCode = await getInseeCode(fields.postalCode, fields.city) } @@ -124,7 +124,9 @@ async function verifyUserIdentity( } if (!pdl) { - Sentry.captureException('Second chance failed, no pdl found') + Sentry.captureException('Second chance failed, no pdl found', { + tags: { section: 'verifyUserIdentity' }, + }) } } @@ -132,10 +134,14 @@ async function verifyUserIdentity( log('error', 'PointId does not match') if (isAlternateStart) { - Sentry.captureException('PointId does not match: Alternate start') + Sentry.captureException('PointId does not match: Alternate start', { + tags: { section: 'verifyUserIdentity' }, + }) throw new Error(errors.TERMS_VERSION_MISMATCH) } else { - Sentry.captureException('PointId does not match') + Sentry.captureException('PointId does not match', { + tags: { section: 'verifyUserIdentity' }, + }) throw new Error(errors.LOGIN_FAILED) } }