cql-io-1.1.0: Cassandra CQL client.

Safe HaskellNone
LanguageHaskell2010

Database.CQL.IO.Exception

Synopsis

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.

Constructors

ResponseError 

Fields

data HostError 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, ...).

Constructors

NoHostAvailable

There is currently not a single host available to the client according to the configured Policy.

HostsBusy

All streams on all connections are currently in use.

data ConnectionError Source #

An error while establishing or using a connection to send a request or receive a response.

Constructors

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 setConnectTimeout. Retries are always safe.

ResponseTimeout !InetAddr

A timeout occurred while waiting for a response. See also setResponseTimeout. Retries are only safe for idempotent queries.

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.

Constructors

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 Unprepared server response upon executing a prepared query. This indicates a problem with the communication protocol and should be reported.

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.

data NoShow Source #

Placeholder for parts of a Response that are not Showable.

Constructors

NoShow 
Instances
Show NoShow Source # 
Instance details

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.

Constructors

HashCollision !Text !Text 

data AuthenticationError Source #

An error occurred during the authentication phase while initialising a new connection. This indicates a configuration error or a faulty Authenticator.

Constructors

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 Authenticator did not respond to.

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.