Field errors as AutomationJob::validate() returns them. */ private $errors; /** * @param array $errors Field errors from AutomationJob::validate(). */ public function __construct( array $errors ) { parent::__construct( 'Job validation failed: ' . wp_json_encode( $errors ) ); $this->errors = $errors; } /** * @return array The field errors. */ public function getErrors(): array { return $this->errors; } }