client: improve error handling on version parsing