Handle stream errors