code: def fail_first_step_precondition_exception(self, scenario):
          
  
          try:
              import behave
              if parse_version(behave.__version__) < parse_version('1.2.6'):
                  status = 'failed'
              else:
                  status = behave.model_core.Status.failed
          except ImportError as exc:
              self.logger.error(exc)
              raise
  
          scenario.steps[0].status = status
          scenario.steps[0].exception = Exception("Preconditions failed")
          scenario.steps[0].error_message = "Failing steps due to precondition exceptions"
docs: Fail first step in the given Scenario and add exception message for the output.
          This is needed because xUnit exporter in Behave fails if there are not failed steps.
          :param scenario: Behave's Scenario