Skip to content

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__

 | __init__(**kwargs: Any)

Instantiate error handler.

config

 | @property
 | config() -> Dict[str, Any]

Get handler config.

send_unsupported_protocol

 | @abstractmethod
 | 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
 | 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
 | 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

Back to top