Skip to content

Latest commit

 

History

History
101 lines (62 loc) · 1.83 KB

base.md

File metadata and controls

101 lines (62 loc) · 1.83 KB

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 envelope
  • logger: 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 envelope
  • exception: the exception raised during decoding
  • logger: 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 envelope
  • reason: the reason for the failure
  • logger: the logger

Returns:

None