fix err result duck typing