Probably also worth validating that the json you get in the event is of the proper format too (i.e., has a `type`, `sourceCode`) and if not, `console.log` and throw.