I use DecodingError.dataCorrupted in the implementation, which seemed like the most relevant error.
That's true, another implementation could fatal error or throw a different specific error. I don't think that kinds of difference would pose a significant problem.