taskiq
taskiq copied to clipboard
Noisy "Cannot parse return type..." log warning on task error
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!