File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed
dotcom-rendering/src/components Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change 11import { css } from '@emotion/react' ;
22import type { SerializedStyles } from '@emotion/react' ;
3- import { isUndefined } from '@guardian/libs' ;
3+ import { isUndefined , log , getErrorMessage } from '@guardian/libs' ;
44import {
55 article17 ,
66 from ,
@@ -223,11 +223,23 @@ const setupWindowListeners = (iframe: HTMLIFrameElement) => {
223223 try {
224224 message = JSON . parse ( event . data ) ;
225225 } catch ( e ) {
226- window . guardian . modules . sentry . reportError (
226+ if (
227227 // @ts -expect-error
228- e ,
229- 'Json parse Failed on in interactiveBlockComponent' ,
230- ) ;
228+ window . guardian . config . page . contentId ===
229+ 'politics/2025/oct/02/could-nigel-farage-really-win-the-next-election-heres-what-the-polls-say'
230+ ) {
231+ log (
232+ 'dotcom' ,
233+ getErrorMessage ( e ) ,
234+ 'Json parse Failed on in interactiveBlockComponent' ,
235+ ) ;
236+ } else {
237+ window . guardian . modules . sentry . reportError (
238+ // @ts -expect-error
239+ e ,
240+ 'Json parse Failed on in interactiveBlockComponent' ,
241+ ) ;
242+ }
231243 }
232244
233245 if ( isUndefined ( message ) ) {
You can’t perform that action at this time.
0 commit comments