Process port errors gracefully