From fa3d59f89d388a6442db0f1a94b498209ba7d3d7 Mon Sep 17 00:00:00 2001 From: build-token <build-token> Date: Mon, 21 Aug 2023 15:16:08 +0000 Subject: [PATCH] publish: log(parsing): generic exception message generated from commit 88fd1b8506093e4c0a7683290751ac78a686e31c --- index.js | 2 +- onDeleteAccount.js | 40 +++++++++++++++++++++++++++++++++------- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/index.js b/index.js index 0e1b978..c29de7d 100644 --- a/index.js +++ b/index.js @@ -229304,7 +229304,7 @@ function parsePointId(pointId) { } else if (strPointId.length === 13) { return `0${strPointId}` } else { - const errorMessage = `PointId ${pointId} is malformed` + const errorMessage = 'PointId is malformed' Sentry.captureException(errorMessage, { tags: { section: 'parsePointId', diff --git a/onDeleteAccount.js b/onDeleteAccount.js index 29a29a8..1602c6f 100644 --- a/onDeleteAccount.js +++ b/onDeleteAccount.js @@ -228527,7 +228527,7 @@ function parsePointId(pointId) { } else if (strPointId.length === 13) { return `0${strPointId}` } else { - const errorMessage = `PointId ${pointId} is malformed` + const errorMessage = 'PointId is malformed' Sentry.captureException(errorMessage, { tags: { section: 'parsePointId', @@ -246404,7 +246404,13 @@ module.exports = { isLocal, isDev } /* 1766 */, /* 1767 */, /* 1768 */, -/* 1769 */, +/* 1769 */ +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"name":"enedissgegrandlyon","version":"1.3.2","description":"","repository":{"type":"https","url":"https://forge.grandlyon.com/web-et-numerique/llle_project/enedis-sge-konnector"},"keywords":[],"main":"./src/index.js","author":"Cozy Cloud","license":"AGPL-3.0","eslintConfig":{"extends":["cozy-app"]},"eslintIgnore":["build","data"],"husky":{"hooks":{"pre-commit":"yarn lint"}},"jest":{"setupFiles":["./setupTests.js"]},"scripts":{"build":"webpack","clean":"rm -rf ./data","cozyPublish":"cozy-app-publish --token $REGISTRY_TOKEN --build-commit $(git rev-parse ${DEPLOY_BRANCH:-build})","deploy":"git-directory-deploy --directory build/ --branch ${DEPLOY_BRANCH:-build}","deploy-dev":"git-directory-deploy --directory build/ --branch ${DEPLOY_BRANCH:-build-dev}","dev":"cozy-konnector-dev","lint":"eslint --fix .","onDeleteAccount:standalone":"cozy-konnector-standalone src/onDeleteAccount.js","onDeleteAccount":"cozy-konnector-dev src/onDeleteAccount.js","pretest":"npm run clean","release":"standard-version --no-verify","standalone":"cozy-konnector-standalone","standalone-no-data":"NO_DATA=true cozy-konnector-standalone src/index.js","start":"node ./src/index.js","test:cov":"jest --coverage","test":"jest","travisDeployKey":"./bin/generate_travis_deploy_key"},"dependencies":{"@sentry/node":"^7.23.0","@sentry/tracing":"^7.23.0","axios":"^0.27.2","cozy-konnector-libs":"5.0.0","easy-soap-request":"^4.7.0","jest":"^28.1.3","moment":"^2.29.3","moment-timezone":"^0.5.34","xml2js":"^0.4.23"},"devDependencies":{"cozy-jobs-cli":"2.0.0","cozy-konnector-build":"1.4.5","eslint-config-cozy-app":"5.5.0","eslint-plugin-prettier":"^4.2.1","git-directory-deploy":"1.5.1","jest-junit":"^14.0.0","standard-version":"^9.5.0"}}'); + +/***/ }), /* 1770 */ /***/ ((module, __unused_webpack_exports, __webpack_require__) => { @@ -246422,10 +246428,30 @@ const moment = __webpack_require__(1417) __webpack_require__(1554) const { isLocal, isDev } = __webpack_require__(1731) const Sentry = __webpack_require__(1600) +const { version } = __webpack_require__(1769) moment.locale('fr') // set the language moment.tz.setDefault('Europe/Paris') // set the timezone +/** + * Sentry + */ +Sentry.init({ + dsn: 'https://18747a93401447f2a81b83cd8c4bbbdf@grandlyon.errors.cozycloud.cc/5', + + // Set tracesSampleRate to 1.0 to capture 100% + // of transactions for performance monitoring. + // We recommend adjusting this value in production + tracesSampleRate: isLocal() ? 0 : 1.0, + release: version, + environment: isDev() ? 'development' : 'production', + debug: isDev(), + integrations: [ + // enable HTTP calls tracing + new Sentry.Integrations.Http({ tracing: true }), + ], +}) + async function onDeleteAccount() { try { log('info', 'Deleting account ...') @@ -246479,8 +246505,7 @@ async function onDeleteAccount() { } else { const errorMessage = `No service id retrieved from BO` log('error', errorMessage) - Sentry.captureException(errorMessage) - throw new Error(errors.VENDOR_DOWN) + throw new Error(errorMessage) } } @@ -246489,8 +246514,7 @@ async function onDeleteAccount() { const errorMessage = 'No account revision was found, something went wrong during the deletion of said account' log('error', errorMessage) - Sentry.captureException(errorMessage) - throw new Error(errors.VENDOR_DOWN) + throw new Error(errorMessage) } } catch (error) { log('debug', 'error catched in onDeleteAccount()', error) @@ -246508,7 +246532,9 @@ onDeleteAccount().then( err => { const errorMessage = `onDeleteAccount: An error occurred during script: ${err.message}` log('error', errorMessage) - Sentry.captureException(errorMessage) + Sentry.captureException(errorMessage, { + tags: { section: 'onDeleteAccount' }, + }) throw new Error(errors.VENDOR_DOWN) } ) -- GitLab