handle decode errors