AMQP uses exceptions to handle errors:
According to the AMQP specification, an exception closes the associated channel or connection, and returns a reply code and reply text to the client. However, amqpy will automatically re-open the channel after a channel error.
amqpy.exceptions.
Timeout
[source]¶Bases: TimeoutError
General AMQP operation timeout
amqpy.exceptions.
ContentTooLarge
(reply_text=None, method_type=None, method_name=None, reply_code=None, channel_id=None)[source]¶Bases: amqpy.exceptions.RecoverableChannelError
The client attempted to transfer content larger than the server could accept at the present time. The client may retry at a later time.
amqpy.exceptions.
NoConsumers
(reply_text=None, method_type=None, method_name=None, reply_code=None, channel_id=None)[source]¶Bases: amqpy.exceptions.RecoverableChannelError
When the exchange cannot deliver to a consumer when the immediate flag is set. As a result of pending data on the queue or the absence of any consumers of the queue.
amqpy.exceptions.
ConnectionForced
(reply_text=None, method_type=None, method_name=None, reply_code=None, channel_id=None)[source]¶Bases: amqpy.exceptions.RecoverableConnectionError
An operator intervened to close the connection for some reason. The client may retry at some later date.
amqpy.exceptions.
InvalidPath
(reply_text=None, method_type=None, method_name=None, reply_code=None, channel_id=None)[source]¶Bases: amqpy.exceptions.IrrecoverableConnectionError
The client tried to work with an unknown virtual host.
amqpy.exceptions.
AccessRefused
(reply_text=None, method_type=None, method_name=None, reply_code=None, channel_id=None)[source]¶Bases: amqpy.exceptions.IrrecoverableChannelError
The client attempted to work with a server entity to which it has no access due to security settings.
amqpy.exceptions.
NotFound
(reply_text=None, method_type=None, method_name=None, reply_code=None, channel_id=None)[source]¶Bases: amqpy.exceptions.IrrecoverableChannelError
The client attempted to work with a server entity that does not exist.
amqpy.exceptions.
ResourceLocked
(reply_text=None, method_type=None, method_name=None, reply_code=None, channel_id=None)[source]¶Bases: amqpy.exceptions.RecoverableChannelError
The client attempted to work with a server entity to which it has no access because another client is working with it.
amqpy.exceptions.
PreconditionFailed
(reply_text=None, method_type=None, method_name=None, reply_code=None, channel_id=None)[source]¶Bases: amqpy.exceptions.IrrecoverableChannelError
The client requested a method that was not allowed because some precondition failed.
amqpy.exceptions.
FrameError
(reply_text=None, method_type=None, method_name=None, reply_code=None, channel_id=None)[source]¶Bases: amqpy.exceptions.IrrecoverableConnectionError
The sender sent a malformed frame that the recipient could not decode. This strongly implies a programming error in the sending peer.
amqpy.exceptions.
FrameSyntaxError
(reply_text=None, method_type=None, method_name=None, reply_code=None, channel_id=None)[source]¶Bases: amqpy.exceptions.IrrecoverableConnectionError
The sender sent a frame that contained illegal values for one or more fields. This strongly implies a programming error in the sending peer.
amqpy.exceptions.
InvalidCommand
(reply_text=None, method_type=None, method_name=None, reply_code=None, channel_id=None)[source]¶Bases: amqpy.exceptions.IrrecoverableConnectionError
The client sent an invalid sequence of frames, attempting to perform an operation that was considered invalid by the server. This usually implies a programming error in the client.
amqpy.exceptions.
ChannelNotOpen
(reply_text=None, method_type=None, method_name=None, reply_code=None, channel_id=None)[source]¶Bases: amqpy.exceptions.IrrecoverableConnectionError
The client attempted to work with a channel that had not been correctly opened. This most likely indicates a fault in the client layer.
amqpy.exceptions.
UnexpectedFrame
(reply_text=None, method_type=None, method_name=None, reply_code=None, channel_id=None)[source]¶Bases: amqpy.exceptions.IrrecoverableConnectionError
The peer sent a frame that was not expected, usually in the context of a content header and body. This strongly indicates a fault in the peer’s content processing.
amqpy.exceptions.
ResourceError
(reply_text=None, method_type=None, method_name=None, reply_code=None, channel_id=None)[source]¶Bases: amqpy.exceptions.RecoverableConnectionError
The server could not complete the method because it lacked sufficient resources. This may be due to the client creating too many of some type of entity.
amqpy.exceptions.
NotAllowed
(reply_text=None, method_type=None, method_name=None, reply_code=None, channel_id=None)[source]¶Bases: amqpy.exceptions.IrrecoverableConnectionError
The client tried to work with some entity in a manner that is prohibited by the server, due to security settings or by some other criteria.
amqpy.exceptions.
AMQPNotImplementedError
(reply_text=None, method_type=None, method_name=None, reply_code=None, channel_id=None)[source]¶Bases: amqpy.exceptions.IrrecoverableConnectionError
The client tried to use functionality that is not implemented in the server.
amqpy.exceptions.
InternalError
(reply_text=None, method_type=None, method_name=None, reply_code=None, channel_id=None)[source]¶Bases: amqpy.exceptions.IrrecoverableConnectionError
The server could not complete the method because of an internal error. The server may require intervention by an operator in order to resume normal operations.