From 8f032883c5f38da90619dce061bafc202db070c0 Mon Sep 17 00:00:00 2001 From: Fabien Boucher Date: Wed, 3 Jan 2024 22:01:57 +0000 Subject: [PATCH] Rename PageInfoError to RateLimitInfoError --- src/Lentille.hs | 2 +- src/Lentille/GraphQL.hs | 2 +- src/Macroscope/Worker.hs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Lentille.hs b/src/Lentille.hs index bf5e54d2a..5befc974d 100644 --- a/src/Lentille.hs +++ b/src/Lentille.hs @@ -113,7 +113,7 @@ data LentilleError = LentilleError UTCTime LentilleErrorKind data LentilleErrorKind = DecodeError [Text] | RequestError GraphQLError - | PageInfoError GraphQLError + | RateLimitInfoError GraphQLError | PartialErrors Value deriving (Show, Generic, ToJSON) diff --git a/src/Lentille/GraphQL.hs b/src/Lentille/GraphQL.hs index 03a414fc1..5837faaf3 100644 --- a/src/Lentille/GraphQL.hs +++ b/src/Lentille/GraphQL.hs @@ -249,7 +249,7 @@ streamFetch client@GraphClient {..} mkArgs StreamFetchOptParams {..} transformRe Nothing -> pure Nothing case mErr of - Just err -> yieldStreamError $ PageInfoError $ mkGraphQLError err + Just err -> yieldStreamError $ RateLimitInfoError $ mkGraphQLError err Nothing -> go Nothing 0 go pageInfoM totalFetched = do diff --git a/src/Macroscope/Worker.hs b/src/Macroscope/Worker.hs index 1d668692f..61e2825c6 100644 --- a/src/Macroscope/Worker.hs +++ b/src/Macroscope/Worker.hs @@ -130,7 +130,7 @@ processStream logFunc postFunc = go (0 :: Word) [] [] (crawlerErrorMessage, crawlerErrorBody) = case err of DecodeError xs -> ("decode", encodeJSON xs) RequestError e -> ("graph", encodeJSON e) - PageInfoError e -> ("page-info", encodeJSON e) + RateLimitInfoError e -> ("rate-limit-info", encodeJSON e) PartialErrors es -> ("partial", encodeJSON es) processBatch :: [DocumentType] -> Eff es (Maybe ProcessError)