It could be more clear to use the `try`, `except`, `finally` as in:                               [optional]

```python
try:
    ... 
    new_subtask_status, send_exception = ....
except Exception:
    ...
    update_subtask_status..
finally:
    if send_exception is None:
    ....
    elif isintance....
```