What’s the right way to unwrap a TaskFailedException? err.task.exception.task.exception gives me the original exception, but that seems very brittle.
Note that the original poster on Slack cannot see your response here on Discourse. Consider transcribing the appropriate answer back to Slack, or pinging the poster here on Discourse so they can follow this thread. (Original message )(More Info)
I wanted only to point out, that having the task variable t or a channel – if it happens to be bound to a channel –, you have direct access to the exception without wrapping it in a try - catch block. I use it all the time.
Right, makes sense.
This did indeed come up in the context of iterating over a Channel (returned from walkdir), but it seems easier to look at the caught exception than accessing the channel directly to me.