handle decoding errors