PTFM-6910: handle non-ASCII errors without crashing.