def METHOD_NAME(self, step: Step, e: BaseException) -> None:
    # We don't do anything with uncacheable steps.
    if not step.cache_results:
        return
    assert e is not None
    existing_step_info = self.unique_id_to_info[step.unique_id]
    if existing_step_info.state != StepState.RUNNING:
        raise StepStateError(step, existing_step_info.state)
    existing_step_info.end_time = utc_now_datetime()
    existing_step_info.error = exception_to_string(e)