From 296160b67171e762ad648683e171f2eedb6479ea Mon Sep 17 00:00:00 2001 From: Pierre Ecarlat <pecarlat@grandlyon.com> Date: Tue, 30 Jul 2024 08:36:55 +0000 Subject: [PATCH] Revert "Catch error serviceSouscritId" --- src/helpers/parsing.js | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/src/helpers/parsing.js b/src/helpers/parsing.js index 5613761..af11ce2 100644 --- a/src/helpers/parsing.js +++ b/src/helpers/parsing.js @@ -75,22 +75,9 @@ function parseContracts(result) { function parseServiceId(result) { log('info', 'Parsing serviceId') const json = JSON.stringify(result) - const contractInfo = - JSON.parse(json)['Envelope']['Body'][ - 'commanderCollectePublicationMesuresResponse' - ] - if (contractInfo !== undefined) { - return contractInfo['serviceSouscritId'] - } else { - const errorMessage = - "No serviceSouscritId found, contract hasn't been created properly." - Sentry.captureException(errorMessage, { - tags: { - section: 'parseServiceId', - }, - }) - throw new Error(errorMessage) - } + return JSON.parse(json)['Envelope']['Body'][ + 'commanderCollectePublicationMesuresResponse' + ]['serviceSouscritId'] } /** -- GitLab