capture ValueError raised if userid is invalid