boilerplate¶
- error_handler(func_ext: Callable[[Any, Any], Awaitable[Any]] | None = None, *, attempts: int = 5, wait: int = 5)[source]¶
Decorator to add error handling to the decorated function The function must accept an API object as first arguments
- Parameters:
func_ext – Substitute for func if the decorator is run without argument. Do not provide it directly
attempts – Number of attempts to do before raising the error
wait – Time (in seconds) to wait after each call