is_recoverable
- caqtus.types.recoverable_exceptions.is_recoverable(error: BaseException) bool
Check if an error is recoverable.
An error is recoverable if any of the following conditions are met:
The error is an instance of
RecoverableException.The error’s cause is a recoverable error.
The error is an instance of
BaseExceptionGroupand all its sub-exceptions are recoverable.
Note that an error can be recoverable even if its cause is not recoverable, if the error itself is recoverable.