napkin-0.5.14
Safe HaskellSafe-Inferred
LanguageGHC2021

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 :: forall m a. (MonadIO m, MonadMask m) => m a -> m a #

recoverWith :: forall m a. (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.