## exceptions.EpistoleError


An [EpistoleError](exceptions.EpistoleError.md#epistole.exceptions.EpistoleError) reports an error reply from a mail service, or a network failure.


Usage

``` python
exceptions.EpistoleError(
    message,
    /,
    *,
    backend=None,
)
```


Epistole raises `TypeError` or `ValueError` instead for a mistake it finds before any network call. A retry loop catches the transient set `(ThrottledError, TransportError, ProviderError)` by name. See ADR-0004.


## Attributes


`backend: Backend | None`  
The backend the error came from. [Connection.send](Connection.md#epistole.Connection.send) and [Backend.connect](Backend.md#epistole.Backend.connect) set it, so it is `None` only on an error inspected before it propagates.


## Methods

| Name | Description |
|----|----|
| [__reduce__()](#__reduce__) | Pickle through `_rebuild`, so unpickling skips `__init__`. |

------------------------------------------------------------------------


#### \_\_reduce\_\_()


Pickle through `_rebuild`, so unpickling skips `__init__`.


Usage

``` python
__reduce__()
```


With the default reduction, unpickling calls `cls(message)`, which raises `TypeError` for [RecipientsRefusedError](exceptions.RecipientsRefusedError.md#epistole.exceptions.RecipientsRefusedError) because `refused` is required. A process pool would then raise `BrokenProcessPool` instead of the refusal. As with any exception, pickling drops `__cause__`, `__context__` and `__traceback__`.
