async def METHOD_NAME(
    decoy: Decoy,
    mock_run_controller: RunController,
    exception: Exception,
    expected_error_id: str,
    expected_status_code: int,
    mock_maintenance_engine_store: MaintenanceEngineStore,
) -> None:
    """It should 409 if the runner is not able to handle the action."""
    run_id = "some-run-id"
    action_id = "some-action-id"
    created_at = datetime(year=2021, month=1, day=1)
    action_type = RunActionType.PLAY
    request_body = RequestModel(data=RunActionCreate(actionType=action_type))
    decoy.when(mock_maintenance_engine_store.current_run_id).then_return(None)
    decoy.when(
        mock_run_controller.create_action(
            action_id=action_id,
            action_type=action_type,
            created_at=created_at,
        )
    ).then_raise(exception)
    with pytest.raises(ApiError) as exc_info:
        await create_run_action(
            runId=run_id,
            request_body=request_body,
            run_controller=mock_run_controller,
            action_id=action_id,
            created_at=created_at,
            maintenance_engine_store=mock_maintenance_engine_store,
        )
    assert exc_info.value.status_code == expected_status_code
    assert exc_info.value.content["errors"][0]["id"] == expected_error_id