def METHOD_NAME(component_info: ComponentInfo, exception, update_always: bool):
    active_context = getattr(
        MultiComponentUpdateContext.__thread_local, "active_context", None
    )  # type: Optional[MultiComponentUpdateContext]
    if active_context:
        # If a MultiComponentUpdateContext is active, we need make sure that it will not override
        # the value for the individual component
        active_context.ignore_subcomponent_state(component_info)
    if exception:
        fault_state = FaultState.from_exception(exception)
    else:
        # Fehlerstatus nicht überschreiben
        if update_always:
            fault_state = FaultState.no_error()
        else:
            return
    fault_state.store_error(component_info)