Throw custom error when HPR number is invalid