aea.error_
handler.base
This module contains the abstract error handler class.
AbstractErrorHandler Objects
class AbstractErrorHandler(ABC)
Error handler class for handling problematic envelopes.
__
init__
def __init__(**kwargs: Any)
Instantiate error handler.
config
@property
def config() -> Dict[str, Any]
Get handler config.
send_
unsupported_
protocol
@abstractmethod
def send_unsupported_protocol(envelope: Envelope, logger: Logger) -> None
Handle the received envelope in case the protocol is not supported.
Arguments:
envelope
: the envelopelogger
: the logger
Returns:
None
send_
decoding_
error
@abstractmethod
def send_decoding_error(envelope: Envelope, exception: Exception,
logger: Logger) -> None
Handle a decoding error.
Arguments:
envelope
: the envelopeexception
: the exception raised during decodinglogger
: the logger
Returns:
None
send_
no_
active_
handler
@abstractmethod
def send_no_active_handler(envelope: Envelope, reason: str,
logger: Logger) -> None
Handle the received envelope in case the handler is not supported.
Arguments:
envelope
: the envelopereason
: the reason for the failurelogger
: the logger
Returns:
None