Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ResponseError = ResponseError {}
- toResponseError :: HostResponse k a b -> Maybe ResponseError
- fromResponseError :: ResponseError -> HostResponse k a b
- data HostError
- data ConnectionError
- data ProtocolError where
- UnexpectedResponse :: Host -> Response k a b -> ProtocolError
- UnexpectedQueryId :: QueryId k a b -> ProtocolError
- UnsupportedCompression :: CompressionAlgorithm -> [CompressionAlgorithm] -> ProtocolError
- SerialiseError :: String -> ProtocolError
- ParseError :: String -> ProtocolError
- data NoShow = NoShow
- data HashCollision = HashCollision !Text !Text
- data AuthenticationError
- recover :: forall m a. MonadCatch m => m a -> a -> m a
- ignore :: MonadCatch m => m () -> m ()
- tryAll :: forall m a b. MonadCatch m => NonEmpty a -> (a -> m b) -> m b
Documentation
data ResponseError Source #
The server responded with an Error
.
Most of these errors are either not retryable or only safe to retry for idempotent queries. For more details of which errors may be safely retried under which circumstances, see also the documentation of the Java driver.
Instances
Show ResponseError Source # | |
Defined in Database.CQL.IO.Exception showsPrec :: Int -> ResponseError -> ShowS # show :: ResponseError -> String # showList :: [ResponseError] -> ShowS # | |
Exception ResponseError Source # | |
Defined in Database.CQL.IO.Exception |
toResponseError :: HostResponse k a b -> Maybe ResponseError Source #
fromResponseError :: ResponseError -> HostResponse k a b Source #
An error during host selection prior to query execution.
These errors are always safe to retry but may indicate an overload situation and thus suggest a review of the client and cluster configuration (number of hosts, pool sizes, connections per host, streams per connection, ...).
NoHostAvailable | There is currently not a single host available to the
client according to the configured |
HostsBusy | All streams on all connections are currently in use. |
Instances
Show HostError Source # | |
Exception HostError Source # | |
Defined in Database.CQL.IO.Exception toException :: HostError -> SomeException # fromException :: SomeException -> Maybe HostError # displayException :: HostError -> String # |
data ConnectionError Source #
An error while establishing or using a connection to send a request or receive a response.
ConnectionClosed !InetAddr | The connection was suddenly closed. Retries are only safe for idempotent queries. |
ConnectTimeout !InetAddr | A timeout occurred while establishing a connection.
See also |
ResponseTimeout !InetAddr | A timeout occurred while waiting for a response.
See also |
Instances
Show ConnectionError Source # | |
Defined in Database.CQL.IO.Exception showsPrec :: Int -> ConnectionError -> ShowS # show :: ConnectionError -> String # showList :: [ConnectionError] -> ShowS # | |
Exception ConnectionError Source # | |
Defined in Database.CQL.IO.Exception |
data ProtocolError where Source #
A protocol error indicates a problem related to the client-server communication protocol. The cause may either be misconfiguration on the client or server, or an implementation bug. In the latter case it should be reported. In either case these errors are not recoverable and should never be retried.
UnexpectedResponse :: Host -> Response k a b -> ProtocolError | The client received an unexpected response for a request. This indicates a problem with the communication protocol and should be reported. |
UnexpectedQueryId :: QueryId k a b -> ProtocolError | The client received an unexpected query ID in an |
UnsupportedCompression :: CompressionAlgorithm -> [CompressionAlgorithm] -> ProtocolError | The client tried to use a compression algorithm that is not supported by the server. The first argument is the offending algorithm and the second argument the list of supported algorithms as reported by the server. This indicates a client or server-side configuration error. |
SerialiseError :: String -> ProtocolError | An error occurred during the serialisation of a request. This indicates a problem with the wire protocol and should be reported. |
ParseError :: String -> ProtocolError | An error occurred during parsing of a response. This indicates a problem with the wire protocol and should be reported. |
Instances
Show ProtocolError Source # | |
Defined in Database.CQL.IO.Exception showsPrec :: Int -> ProtocolError -> ShowS # show :: ProtocolError -> String # showList :: [ProtocolError] -> ShowS # | |
Exception ProtocolError Source # | |
Defined in Database.CQL.IO.Exception |
data HashCollision Source #
An unexpected hash collision occurred for a prepared query string. This indicates a problem with the implementation of prepared queries and should be reported.
Instances
Show HashCollision Source # | |
Defined in Database.CQL.IO.Exception showsPrec :: Int -> HashCollision -> ShowS # show :: HashCollision -> String # showList :: [HashCollision] -> ShowS # | |
Exception HashCollision Source # | |
Defined in Database.CQL.IO.Exception |
data AuthenticationError Source #
An error occurred during the authentication phase while
initialising a new connection. This indicates a configuration
error or a faulty Authenticator
.
AuthenticationRequired !AuthMechanism | The server demanded authentication but none was provided by the client. |
UnexpectedAuthenticationChallenge !AuthMechanism !AuthChallenge | The server presented an additional authentication challenge
that the configured |
Instances
Show AuthenticationError Source # | |
Defined in Database.CQL.IO.Exception showsPrec :: Int -> AuthenticationError -> ShowS # show :: AuthenticationError -> String # showList :: [AuthenticationError] -> ShowS # | |
Exception AuthenticationError Source # | |
recover :: forall m a. MonadCatch m => m a -> a -> m a Source #
Recover from all (synchronous) exceptions raised by a computation with a fixed value.
ignore :: MonadCatch m => m () -> m () Source #
Ignore all (synchronous) exceptions raised by a computation that produces no result, i.e. is only run for its (side-)effects.
tryAll :: forall m a b. MonadCatch m => NonEmpty a -> (a -> m b) -> m b Source #
Try a computation on a non-empty list of values, recovering from (synchronous) exceptions for all but the last value.