this catch is too broad. also `to_function` already takes a `failhard` param that should probably catch this error and return `None`