Handle any serialization errors appropreately