Exceptions

This module defines custom Exception classes for MetricQ. In general, they are used for errors in the interaction with other agents. Contrary, misuse of the API generally yields specific built-in errors, i.e., TypeError, ValueError, and, KeyError. AssertionError / assert is only used for checking invariants within the library itself.

exception metricq.exceptions.AgentStopped

The agent was stopped unexpectedly.

There is probably something wrong with the network.

exception metricq.exceptions.ConnectFailed

The connection attempt of the agent failed.

exception metricq.exceptions.HistoryError

The database replied with an error to a history request.

This could either be an issue with the request or of the database.

exception metricq.exceptions.InvalidHistoryResponse(extra_message)

A response to a history request could not be decoded.

exception metricq.exceptions.MessageError

Something is semantically wrong within a received message.

exception metricq.exceptions.NonMonotonicTimestamps

Timestamps in a history response are not strictly monotonic.

exception metricq.exceptions.PublishFailed

Publishing to an exchange failed unexpectedly.

The source exception is always attached as a cause.

exception metricq.exceptions.RPCError

An RPC returned an error code.

This could be an issue with the input or on the other side.

exception metricq.exceptions.ReceivedSignal(signal, *args)

The agent was stopped by a specific signal.

exception metricq.exceptions.ReconnectTimeout

An agent reconnect timed out.

exception metricq.exceptions.RemoteError

The remote has replied with an error.