# SE-0489: Improve EncodingError and DecodingError's printed descriptions

**URL:** <https://forums.swift.org/t/se-0489-improve-encodingerror-and-decodingerrors-printed-descriptions/81021>\
**Category:** Proposal Reviews\
**Created:** [July 9, 2025, 5:21pm UTC](https://forums.swift.org/t/se-0489-improve-encodingerror-and-decodingerrors-printed-descriptions/81021 "2025-07-09T17:21:14Z")\
**Posts on this page:** 1\
**Showing post:** 28

<div class="post-metadata">

**Author:** ![FranzBusch](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/franzbusch/32/19447_2.png) [@FranzBusch](https://forums.swift.org/u/FranzBusch)\
**Post date:** [July 24, 2025, 5:38pm UTC](https://forums.swift.org/t/se-0489-improve-encodingerror-and-decodingerrors-printed-descriptions/81021/28 "2025-07-24T17:38:03Z")

</div>

Thanks for citing this

> [@\[Accepted with modifications\] SE-0445: Improving String.Index’s printed descriptions](https://forums.swift.org/t/accepted-with-modifications-se-0445-improving-string-index-s-printed-descriptions/75108/1):
>
> and no attempt should be made to parse, convert, or otherwise manipulate the output.

I think this is an important point. Nothing should parse, convert or manipulate the debug description. Our logging systems aren’t doing that. They aren’t even calling the debug description API directly. However, as I said above, swift-log is relying heavily on `description` which is often calling `debugDescription`. Furthermore, errors such as the decoding and encoding errors here are often logged. If this proposal is getting accepted as is, then this will most likely break a few logging backends. To make matters worse the only workaround that I see for those backends is to parse the `description` and sanitize it which is too costly to do in every single log.

---

_[View the full topic](https://forums.swift.org/t/se-0489-improve-encodingerror-and-decodingerrors-printed-descriptions/81021)._
