File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
packages/common/src/utils Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ export async function initializeSentry(dsn: string) {
9898 / .* \. c o d e s a n d b o x \. i o / ,
9999 / .* \. c s b \. a p p / ,
100100 ] ,
101- beforeSend : event => {
101+ beforeSend : ( event , hint ) => {
102102 if (
103103 event . stacktrace &&
104104 event . stacktrace . frames &&
@@ -113,6 +113,18 @@ export async function initializeSentry(dsn: string) {
113113 return undefined ;
114114 }
115115
116+ const customError = ( ( hint && ( hint . originalException as any ) ) || { } )
117+ . error ;
118+
119+ if (
120+ customError &&
121+ event . message &&
122+ event . message . startsWith ( 'Non-Error exception captured' )
123+ ) {
124+ // This is an error coming from the sandbox, return with no error.
125+ return undefined ;
126+ }
127+
116128 return event ;
117129 } ,
118130 } ) ;
You can’t perform that action at this time.
0 commit comments