Give better messages than NPE for missing data
[policy/models.git] / models-interactions / model-actors / actor.aai / src / main / java / org / onap / policy / controlloop / actor / aai / AaiGetTenantOperation.java
index b3bf4ce..412e463 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP
  * ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -73,7 +73,7 @@ public class AaiGetTenantOperation extends AaiGetOperation {
         WebTarget web = getClient().getWebTarget().path(path);
         str.append(path);
 
-        String target = getProperty(OperationProperties.AAI_TARGET_ENTITY);
+        String target = getRequiredProperty(OperationProperties.AAI_TARGET_ENTITY, "target entity");
 
         web = addQuery(web, str, "?", "search-node-type", "vserver");
         web = addQuery(web, str, "&", "filter", "vserver-name:EQUALS:" + target);