recordRequest :: P.Request -> State FakeProvider (Either [(P.Interaction, [P.ValidationError])] P.Interaction)
recordRequest req = do
  interactions <- findInteractionForRequest req
  let (successful, failed) = L.partition (null . snd) interactions
  case successful of
    -- we only care about the first match and ignore later matches
    ((interaction, _):_) -> do
      addInteractionMatch interaction
      pure (Right interaction)
    [] -> do
      addMismatchedRequest req
      pure (Left failed)
recordRequest :: P.Request -> State FakeProvider (Either [(P.Interaction, [P.ValidationError])] P.Interaction)
recordRequest req = do
  interactions <- findInteractionForRequest req
  let (successful, failed) = L.partition (null . snd) interactions
  case successful of
    -- we only care about the first match and ignore later matches
    ((interaction, _):_) -> do
      addInteractionMatch interaction
      pure (Right interaction)
    [] -> do
      addMismatchedRequest req
      pure (Left failed)
recordRequest req = do
  interactions <- findInteractionForRequest req
  let (successful, failed) = L.partition (null . snd) interactions
  case successful of
    -- we only care about the first match and ignore later matches
    ((interaction, _):_) -> do
      addInteractionMatch interaction
      pure (Right interaction)
    [] -> do
      addMismatchedRequest req
      pure (Left failed)