napkin-backend-bigquery-2.0.0
Safe HaskellNone
LanguageGHC2024

Napkin.Run.BigQuery.Exceptions

Synopsis

Documentation

eatExceptionsFor :: [Int] -> a -> IO a -> IO a #

Eat exceptions that return any of the status codes presented. This is when we sometimes expect exceptions to come up and don't want that stopping execution.

recover :: (MonadIO m, MonadMask m) => m a -> m a #

recoverWith :: (MonadIO m, MonadMask m) => RetryPolicy -> m a -> m a #

Recover from generally recoverable error.

Used to explicitly not recover from 4XX status codes as they are semantically unrecoverable without altering the request. But it turns out we get errors due to authentication timeouts and alike that require a repeat of the request.