Hello, I have a requirement where I need to detect failed tasks based on the specific errors and emit a metric only when it doesn't fail based on these specific errors (these include unknown_topic_or_partition, specific cases of ConfigException etc)
I know about a similar metric accessible via Prometheus but that gives me count of failed task count for any reason. I was thinking that wrapping the poll method of the task in try catch block would be sufficient where i detect for error details in the catch block and emit metric when they don't match the ones i don't want the metric for) but I am unsure if this captures all possible scenarios for which a task might fail. is it guaranteed that all the exceptions/error for which a task might fail gets emitted via the poll method?