taskiq icon indicating copy to clipboard operation
taskiq copied to clipboard

Noisy "Cannot parse return type..." log warning on task error

Open paul-twelvelabs opened this issue 5 months ago • 0 comments

On task error, task.AsyncTaskiqTask.get_result will emit "Cannot parse..." log warnings that are not really helpful especially considering detailed error information is available elsewhere. Moreover, the result both return_value=None which means serialization to non-None types will always fail.

Would it make sense to wrap that conditionally log only if the result does not an error? e.g.

current

except ValueError:
    logger.warning("Cannot parse return type into %s", self.return_type)

proposed

except ValueError:
    if not res.is_err:
        logger.warning("Cannot parse return type into %s", self.return_type)

--

Thanks for all the hard work! taskiq is great!

paul-twelvelabs avatar Jul 01 '25 02:07 paul-twelvelabs