Skip to content

Commit 1abdefa

Browse files
authored
feat: add Sentry source map (#64)
* feat: add Sentry source map * fix: detailled error of commitment mapper * fix: remove button when the group is a group of vault-id * fix: update error scope
1 parent fcb8261 commit 1abdefa

8 files changed

Lines changed: 42 additions & 18 deletions

File tree

.github/actions/deploy/action.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ runs:
2727
run: |
2828
CI=false yarn build
2929
30-
# - name: Create Sentry release
31-
# uses: getsentry/action-release@v1
32-
# env:
33-
# SENTRY_AUTH_TOKEN: ${{ inputs.sentry-auth-token }}
34-
# SENTRY_ORG: ${{ inputs.sentry-org }}
35-
# SENTRY_PROJECT: ${{ inputs.sentry-project }}
36-
# SENTRY_LOG_LEVEL: debug
37-
# with:
38-
# sourcemaps: './build'
39-
# url_prefix: '~'
40-
# environment: ${{ inputs.sentry-env }}
30+
- name: Create Sentry release
31+
uses: getsentry/action-release@v1
32+
env:
33+
SENTRY_AUTH_TOKEN: ${{ inputs.sentry-auth-token }}
34+
SENTRY_ORG: ${{ inputs.sentry-org }}
35+
SENTRY_PROJECT: ${{ inputs.sentry-project }}
36+
SENTRY_LOG_LEVEL: debug
37+
with:
38+
sourcemaps: './build'
39+
url_prefix: '~'
40+
environment: ${{ inputs.sentry-env }}
4141

4242
- name: Remove source map
4343
shell: bash

.github/workflows/deploy_demo_beta.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@ jobs:
2323
role-to-assume: ${{ secrets.AWS_DEPLOY_ROLE }}
2424
static-bucket-name: demo.vault-beta.sismo.io
2525
env: demo-beta
26+
sentry-env: DEMO_BETA
27+
sentry-auth-token: ${{ secrets.SENTRY_AUTH_TOKEN }}
28+
sentry-org: ${{ secrets.SENTRY_ORG }}
29+
sentry-project: ${{ secrets.SENTRY_PROJECT }}

.github/workflows/deploy_dev_beta.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@ jobs:
2424
role-to-assume: ${{ secrets.AWS_DEPLOY_ROLE }}
2525
static-bucket-name: dev.vault-beta.sismo.io
2626
env: dev-beta
27+
sentry-env: DEMO_DEV
28+
sentry-auth-token: ${{ secrets.SENTRY_AUTH_TOKEN }}
29+
sentry-org: ${{ secrets.SENTRY_ORG }}
30+
sentry-project: ${{ secrets.SENTRY_PROJECT }}

.github/workflows/deploy_prod_beta.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@ jobs:
2424
role-to-assume: ${{ secrets.AWS_DEPLOY_ROLE }}
2525
static-bucket-name: vault-beta.sismo.io
2626
env: prod-beta
27+
sentry-env: PROD_BETA
28+
sentry-auth-token: ${{ secrets.SENTRY_AUTH_TOKEN }}
29+
sentry-org: ${{ secrets.SENTRY_ORG }}
30+
sentry-project: ${{ secrets.SENTRY_PROJECT }}

.github/workflows/deploy_staging_beta.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@ jobs:
2121
role-to-assume: ${{ secrets.AWS_DEPLOY_ROLE }}
2222
static-bucket-name: staging.vault-beta.sismo.io
2323
env: staging-beta
24+
sentry-env: STAGING_BETA
25+
sentry-auth-token: ${{ secrets.SENTRY_AUTH_TOKEN }}
26+
sentry-org: ${{ secrets.SENTRY_ORG }}
27+
sentry-project: ${{ secrets.SENTRY_PROJECT }}

.github/workflows/deploy_staging_dev_beta.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@ jobs:
2121
role-to-assume: ${{ secrets.AWS_DEPLOY_ROLE }}
2222
static-bucket-name: staging.dev.vault-beta.sismo.io
2323
env: staging-dev-beta
24+
sentry-env: STAGING_DEV_BETA
25+
sentry-auth-token: ${{ secrets.SENTRY_AUTH_TOKEN }}
26+
sentry-org: ${{ secrets.SENTRY_ORG }}
27+
sentry-project: ${{ secrets.SENTRY_PROJECT }}

src/pages/Connect/Flow/DataRequests/components/DataClaimRequest.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ export function DataClaimRequest({
198198
vault.importedAccounts,
199199
]);
200200

201+
const isOnlySismoConnectApps = !Boolean(
202+
groupMetadata.accountTypes.find((el) => !el.startsWith("sismo-connect-app"))
203+
);
204+
201205
return (
202206
<Container>
203207
<Left>
@@ -241,7 +245,7 @@ export function DataClaimRequest({
241245
<Right>
242246
{vault?.importedAccounts && (
243247
<>
244-
{!isEligible && (
248+
{!isEligible && !isOnlySismoConnectApps && (
245249
<StyledButton
246250
primary
247251
verySmall

src/pages/Modals/ImportAccount/provider/index.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export default function ImportAccountModalProvider({
8888
const triggerError = (e) => {
8989
Sentry.withScope(function (scope) {
9090
scope.setLevel("fatal");
91-
Sentry.captureException(e);
91+
Sentry.captureException(e?.response?.data);
9292
});
9393
console.error(e);
9494
notificationAdded({
@@ -159,7 +159,7 @@ export default function ImportAccountModalProvider({
159159
} catch (e) {
160160
Sentry.withScope(function (scope) {
161161
scope.setLevel("fatal");
162-
Sentry.captureException(e);
162+
Sentry.captureException(e?.response?.data);
163163
});
164164
console.error(e);
165165
notificationAdded({
@@ -243,7 +243,7 @@ export default function ImportAccountModalProvider({
243243
console.error(e);
244244
Sentry.withScope(function (scope) {
245245
scope.setLevel("fatal");
246-
Sentry.captureException(e);
246+
Sentry.captureException(e?.response?.data);
247247
});
248248
notificationAdded({
249249
text: "Telegram account already imported in this vault or in another one",
@@ -304,7 +304,7 @@ export default function ImportAccountModalProvider({
304304
console.error(e);
305305
Sentry.withScope(function (scope) {
306306
scope.setLevel("fatal");
307-
Sentry.captureException(e);
307+
Sentry.captureException(e?.response?.data);
308308
});
309309
notificationAdded({
310310
text: "Github account already imported in this vault or in another one",
@@ -367,7 +367,7 @@ export default function ImportAccountModalProvider({
367367
console.error(e);
368368
Sentry.withScope(function (scope) {
369369
scope.setLevel("fatal");
370-
Sentry.captureException(e);
370+
Sentry.captureException(e?.response?.data);
371371
});
372372
notificationAdded({
373373
text: "Twitter account already imported in this vault or in another one",
@@ -429,7 +429,7 @@ export default function ImportAccountModalProvider({
429429
console.error(e);
430430
Sentry.withScope(function (scope) {
431431
scope.setLevel("fatal");
432-
Sentry.captureException(e);
432+
Sentry.captureException(e?.response?.data);
433433
});
434434
notificationAdded({
435435
text: "Twitter account already imported in this vault or in another one",

0 commit comments

Comments
 (0)