It's `decode` that can go wrong, not `encode`, so I think it makes sense.