(event, hint)
| 99 | 'Canceled', |
| 100 | ], |
| 101 | beforeSend(event, hint) { |
| 102 | // Filter Monaco Editor errors |
| 103 | // |
| 104 | // IMPORTANT: Frame-based filtering doesn't work reliably! |
| 105 | // In beforeSend hooks, frame.filename contains minified bundle paths like: |
| 106 | // "https://static.ce-cdn.net/vendor.v59.be68c0bf31258854d1b2.js" |
| 107 | // |
| 108 | // Source mapping happens AFTER beforeSend processing, which is why the |
| 109 | // final Sentry UI shows readable paths like: |
| 110 | // "./node_modules/monaco-editor/esm/vs/platform/clipboard/browser/clipboardService.js" |
| 111 | // |
| 112 | // For reliable filtering, use: |
| 113 | // 1. ignoreErrors patterns (processed before beforeSend) |
| 114 | // 2. Error message content (event.exception.values[0].value) |
| 115 | // 3. Error type (event.exception.values[0].type) |
| 116 | // |
| 117 | // DO NOT rely on frame.filename, frame.module, or frame.function for Monaco errors! |
| 118 | |
| 119 | if (event.exception?.values?.[0]) { |
| 120 | // Filter hit testing errors |
| 121 | // See: https://github.com/microsoft/monaco-editor/issues/4527 |
| 122 | // Uses error message content since frame data is minified |
| 123 | if (event.exception.values[0].value?.includes('_doHitTestWithCaretPositionFromPoint')) { |
| 124 | return null; // Don't send to Sentry |
| 125 | } |
| 126 | } |
| 127 | return event; |
| 128 | }, |
| 129 | }); |
| 130 | window.addEventListener('unhandledrejection', event => { |
| 131 | let reason = event.reason; |
nothing calls this directly
no outgoing calls
no test coverage detected