fix error handling in petclinic polling