handle stream errors