Skip to content

Commit 97801b3

Browse files
chore: Try storing error JSON in sentry (#4758)
1 parent 5942267 commit 97801b3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

app/sentry.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ if (!config.sentry.dsn.includes('dummy')) {
4545
adapter_errors_json: JSON.stringify(error.errors)
4646
}
4747
}
48+
49+
try {
50+
// Try to store JSON of error for diagnosing bugs
51+
event.extra = {
52+
...event.extra,
53+
error_json: JSON.stringify(error)
54+
}
55+
} catch {
56+
// Ignore error to prevent stackoverflow
57+
}
4858
}
4959

5060
scope.addEventProcessor(function(event: Sentry.Event, hints: Sentry.EventHint) {

0 commit comments

Comments
 (0)