diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java
index b49f9b5..46bec98 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java
@@ -81,7 +81,6 @@
 import io.swagger.v3.oas.annotations.media.Schema;
 import io.swagger.v3.oas.annotations.responses.ApiResponse;
 
-
 @Path("onap/so/infra/orchestrationRequests")
 @OpenAPIDefinition(info = @Info(title = "onap/so/infra/orchestrationRequests",
         description = "API Requests for Orchestration requests"))
@@ -128,33 +127,21 @@
             throw new ValidateException.Builder("Request Id " + requestId + " is not a valid UUID",
                     HttpStatus.SC_BAD_REQUEST, ErrorNumbers.SVC_BAD_PARAMETER).errorInfo(errorLoggerInfo).build();
         }
-        try {
-            infraActiveRequest = requestsDbClient.getInfraActiveRequestbyRequestId(requestId);
-            requestProcessingData = requestsDbClient.getRequestProcessingDataBySoRequestId(requestId);
 
+        infraActiveRequest = infraActiveRequestLookup(requestId);
+
+        try {
+            requestProcessingData = requestsDbClient.getRequestProcessingDataBySoRequestId(requestId);
         } catch (Exception e) {
-            logger.error("Exception occurred", e);
+            logger.error("Exception occurred while communicating with RequestDb during requestProcessingData lookup ",
+                    e);
             ErrorLoggerInfo errorLoggerInfo =
                     new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ACCESS_EXC, ErrorCode.AvailabilityError).build();
 
-            ValidateException validateException =
-                    new ValidateException.Builder("Exception while communciate with Request DB - Infra Request Lookup",
-                            HttpStatus.SC_NOT_FOUND, ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB).cause(e)
-                                    .errorInfo(errorLoggerInfo).build();
-
-            throw validateException;
-
-        }
-
-        if (infraActiveRequest == null) {
-
-            ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_COMMUNICATE_ERROR,
-                    ErrorCode.BusinessProcesssError).build();
-
-            ValidateException validateException =
-                    new ValidateException.Builder("Orchestration RequestId " + requestId + " is not found in DB",
-                            HttpStatus.SC_NO_CONTENT, ErrorNumbers.SVC_DETAILED_SERVICE_ERROR)
-                                    .errorInfo(errorLoggerInfo).build();
+            ValidateException validateException = new ValidateException.Builder(
+                    "Exception occurred while communicating with RequestDb during requestProcessingData lookup",
+                    HttpStatus.SC_NOT_FOUND, ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB).cause(e)
+                            .errorInfo(errorLoggerInfo).build();
 
             throw validateException;
         }
@@ -239,8 +226,6 @@
         logger.debug("requestId is: {}", requestId);
         ServiceInstancesRequest sir;
 
-        InfraActiveRequests infraActiveRequest;
-
         try {
             ObjectMapper mapper = new ObjectMapper();
             sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
@@ -270,41 +255,26 @@
             throw validateException;
         }
 
-        infraActiveRequest = requestsDbClient.getInfraActiveRequestbyRequestId(requestId);
-        if (infraActiveRequest == null) {
-            ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND,
-                    ErrorCode.BusinessProcesssError).build();
+        InfraActiveRequests infraActiveRequest = infraActiveRequestLookup(requestId);
 
-            ValidateException validateException =
-                    new ValidateException.Builder("Null response from RequestDB when searching by RequestId",
-                            HttpStatus.SC_NOT_FOUND, ErrorNumbers.SVC_DETAILED_SERVICE_ERROR).errorInfo(errorLoggerInfo)
-                                    .build();
+        String status = infraActiveRequest.getRequestStatus();
+        if (Status.IN_PROGRESS.toString().equalsIgnoreCase(status) || Status.PENDING.toString().equalsIgnoreCase(status)
+                || Status.PENDING_MANUAL_TASK.toString().equalsIgnoreCase(status)) {
+            infraActiveRequest.setRequestStatus(Status.UNLOCKED.toString());
+            infraActiveRequest.setLastModifiedBy(Constants.MODIFIED_BY_APIHANDLER);
+            infraActiveRequest.setRequestId(requestId);
+            requestsDbClient.save(infraActiveRequest);
+        } else {
+
+            ErrorLoggerInfo errorLoggerInfo =
+                    new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND, ErrorCode.DataError).build();
+
+            ValidateException validateException = new ValidateException.Builder(
+                    "Orchestration RequestId " + requestId + " has a status of " + status + " and can not be unlocked",
+                    HttpStatus.SC_BAD_REQUEST, ErrorNumbers.SVC_DETAILED_SERVICE_ERROR).errorInfo(errorLoggerInfo)
+                            .build();
 
             throw validateException;
-
-        } else {
-            String status = infraActiveRequest.getRequestStatus();
-            if (Status.IN_PROGRESS.toString().equalsIgnoreCase(status)
-                    || Status.PENDING.toString().equalsIgnoreCase(status)
-                    || Status.PENDING_MANUAL_TASK.toString().equalsIgnoreCase(status)) {
-                infraActiveRequest.setRequestStatus(Status.UNLOCKED.toString());
-                infraActiveRequest.setLastModifiedBy(Constants.MODIFIED_BY_APIHANDLER);
-                infraActiveRequest.setRequestId(requestId);
-                requestsDbClient.save(infraActiveRequest);
-            } else {
-
-                ErrorLoggerInfo errorLoggerInfo =
-                        new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND, ErrorCode.DataError)
-                                .build();
-
-                ValidateException validateException = new ValidateException.Builder(
-                        "Orchestration RequestId " + requestId + " has a status of " + status
-                                + " and can not be unlocked",
-                        HttpStatus.SC_BAD_REQUEST, ErrorNumbers.SVC_DETAILED_SERVICE_ERROR).errorInfo(errorLoggerInfo)
-                                .build();
-
-                throw validateException;
-            }
         }
         return Response.status(HttpStatus.SC_NO_CONTENT).entity("").build();
     }
@@ -553,4 +523,34 @@
         addedRequestProcessingData.add(finalProcessingData);
         return addedRequestProcessingData;
     }
+
+    protected InfraActiveRequests infraActiveRequestLookup(String requestId) throws ApiException {
+        InfraActiveRequests infraActiveRequest = null;
+        try {
+            infraActiveRequest = requestsDbClient.getInfraActiveRequestbyRequestId(requestId);
+        } catch (Exception e) {
+            logger.error("Exception occurred while communicating with RequestDb during InfraActiveRequest lookup ", e);
+            ErrorLoggerInfo errorLoggerInfo =
+                    new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ACCESS_EXC, ErrorCode.AvailabilityError).build();
+
+            ValidateException validateException = new ValidateException.Builder(
+                    "Exception occurred while communicating with RequestDb during InfraActiveRequest lookup",
+                    HttpStatus.SC_NOT_FOUND, ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB).cause(e)
+                            .errorInfo(errorLoggerInfo).build();
+
+            throw validateException;
+        }
+
+        if (infraActiveRequest == null) {
+            ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_COMMUNICATE_ERROR,
+                    ErrorCode.BusinessProcesssError).build();
+
+            ValidateException validateException = new ValidateException.Builder(
+                    "Null response from RequestDB when searching by RequestId " + requestId, HttpStatus.SC_NOT_FOUND,
+                    ErrorNumbers.SVC_DETAILED_SERVICE_ERROR).errorInfo(errorLoggerInfo).build();
+
+            throw validateException;
+        }
+        return infraActiveRequest;
+    }
 }
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java
index 12f0ffc..151785d 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java
@@ -335,7 +335,7 @@
         expectedRequestError = new RequestError();
         se = new ServiceException();
         se.setMessageId(ErrorNumbers.SVC_DETAILED_SERVICE_ERROR);
-        se.setText("Null response from RequestDB when searching by RequestId");
+        se.setText("Null response from RequestDB when searching by RequestId " + INVALID_REQUEST_ID);
         expectedRequestError.setServiceException(se);
 
         builder = UriComponentsBuilder.fromHttpUrl(
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java
index 627bbc6..47aa3cc 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java
@@ -21,6 +21,7 @@
 package org.onap.so.apihandlerinfra;
 
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.hamcrest.CoreMatchers.containsString;
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertEquals;
@@ -39,6 +40,7 @@
 import org.mockito.junit.MockitoJUnitRunner;
 import org.onap.so.apihandler.common.ResponseBuilder;
 import org.onap.so.apihandlerinfra.exceptions.ApiException;
+import org.onap.so.apihandlerinfra.exceptions.ValidateException;
 import org.onap.so.constants.OrchestrationRequestFormat;
 import org.onap.so.constants.Status;
 import org.onap.so.db.request.beans.InfraActiveRequests;
@@ -327,4 +329,13 @@
 
         assertEquals(Status.FAILED.toString(), result);
     }
+
+    @Test
+    public void infraActiveRequestNullValidationExceptionTest() throws ApiException {
+        iar.setRequestId(REQUEST_ID);
+        thrown.expect(ValidateException.class);
+        thrown.expectMessage(containsString("Null response from RequestDB when searching by RequestId " + REQUEST_ID));
+        orchestrationRequests.infraActiveRequestLookup(iar.getRequestId());
+    }
+
 }
