From 056c0f81af90b526f1cb0a5d2014dcfe38fc1e29 Mon Sep 17 00:00:00 2001
From: hnouts <hnouts@grandlyon.com>
Date: Mon, 19 Jun 2023 10:20:55 +0200
Subject: [PATCH] publish: to test on alpha

generated from commit 3545c653dadc932f17020bc70e8d8b1e1e79c105
---
 index.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 09320f4..c188926 100644
--- a/index.js
+++ b/index.js
@@ -114,7 +114,14 @@ async function start(fields, cozyParameters) {
     transaction.setStatus(Tracing.SpanStatus.Ok)
     transaction.finish()
   } catch (error) {
-    Sentry.captureException(error)
+    const errorMessage = `EGL konnector encountered an error. Response data: ${JSON.stringify(
+      error.message
+    )}`
+    Sentry.captureMessage(errorMessage, {
+      tags: {
+        section: 'start',
+      },
+    })
     transaction.setStatus(Tracing.SpanStatus.Aborted)
     transaction.finish()
     await Sentry.flush()
-- 
GitLab