discover: fix error handling from failed client writes