Give better messages than NPE for missing data
[policy/models.git] / models-interactions / model-actors / actor.so / src / main / java / org / onap / policy / controlloop / actor / so / ModifyNssi.java
index 2c50388..5386d96 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020 Wipro Limited.
+ * Modifications Copyright (C) 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.
@@ -67,9 +68,9 @@ public class ModifyNssi extends SoOperation {
         return handleResponse(outcome, url, callback -> getClient().put(callback, path, entity, headers));
     }
 
-    private SoRequest3gpp makeRequest() {
+    protected SoRequest3gpp makeRequest() {
 
-        String payload = getProperty(OperationProperties.EVENT_PAYLOAD);
+        String payload = getRequiredProperty(OperationProperties.EVENT_PAYLOAD, "event payload");
         try {
             return getCoder().convert(payload, SoRequest3gpp.class);
         } catch (CoderException e) {