fix: improve bytes to str decoding error handling (#4294)

* (bugfix): Improve bytes to str decoding error handling

* regroup test

* Further broaden tests

* Add another decode error test

* Fix bug in tests

* Reviewer suggestions
3 files changed