1. A system, comprising: a processor; and storage coupled to the processor, wherein the storage stores a computer program, and wherein the processor is configured to execute the computer program to perform operations, wherein the operations comprise: receiving an error inject script that includes a declaration that describes one or more events and an error inject scenario that describes conditions and associated one or more error inject actions; compiling the error inject script to output an error inject data structure; and using the error inject data structure and the one or more events to determine when to execute at least one error inject by, while executing code that includes the error inject, receiving an indication that an event from the one or more events has been triggered; in response to the event from the one or more events being triggered, evaluating the conditions using the error inject data structure; and for a condition from the conditions that evaluates to true, performing the associated one or more error inject actions defined in the error inject script for the condition.