rrweb icon indicating copy to clipboard operation
rrweb copied to clipboard

fix: Handle exceptions thrown from postcss when calling adaptCssForReplay

Open guntherjh opened this issue 1 year ago • 3 comments

This PR adds a try/catch around postcss().process() so that exceptions won't cause playback to crash. I was encountering issues where invalid CSS was being passed to postcss which would result in CssSyntaxError. I am still investigating why invalid CSS is passed to adaptCssForReplay in the first place, but for now this change should at least make sure any exceptions from postcss are at least handled and logged. I am currently using warn to log the exceptions but am happy to switch that to something else if need be.

Related discussion in rrweb slack: https://rrweb.slack.com/archives/C01BYDC5C93/p1727975312250899

guntherjh avatar Oct 08 '24 17:10 guntherjh