diff options
author | Steve Smokowski <ss835w@att.com> | 2019-10-09 11:47:12 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-10-09 11:47:12 +0000 |
commit | 52ad94fa9c73e3edb96abf4dc99fa32c892ded5e (patch) | |
tree | 201dbcd8af17d5c4244dfe3c131f3f7ba0f9d67f /bpmn/so-bpmn-tasks | |
parent | 9c55b74f92bf4d4f017504f917b0bce617a523c8 (diff) | |
parent | fbf6300274558ffe323bf66bb5b23c72c350d3ee (diff) |
Merge "Improved error handling"
Diffstat (limited to 'bpmn/so-bpmn-tasks')
-rw-r--r-- | bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImpl.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImpl.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImpl.java index 32516c1dcb..41649dc838 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImpl.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImpl.java @@ -20,7 +20,9 @@ package org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks; +import com.google.common.base.Optional; import org.onap.so.rest.exceptions.InvalidRestRequestException; +import org.onap.so.rest.exceptions.HttpResouceNotFoundException; import org.onap.so.rest.exceptions.RestProcessingException; import org.onap.so.rest.service.HttpRestServiceProvider; import org.onap.vnfmadapter.v1.model.CreateVnfRequest; @@ -33,7 +35,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; -import com.google.common.base.Optional; /** * @author waqas.ikram@est.tech @@ -82,7 +83,8 @@ public class VnfmAdapterServiceProviderImpl implements VnfmAdapterServiceProvide } return Optional.of(createVnfResponse); - } catch (final RestProcessingException | InvalidRestRequestException httpInvocationException) { + } catch (final RestProcessingException | InvalidRestRequestException + | HttpResouceNotFoundException httpInvocationException) { LOGGER.error("Unexpected error while processing create and instantiation request", httpInvocationException); return Optional.absent(); } @@ -144,7 +146,8 @@ public class VnfmAdapterServiceProviderImpl implements VnfmAdapterServiceProvide return Optional.absent(); } return Optional.of(response.getBody()); - } catch (final RestProcessingException | InvalidRestRequestException httpInvocationException) { + } catch (final RestProcessingException | InvalidRestRequestException + | HttpResouceNotFoundException httpInvocationException) { LOGGER.error("Unexpected error while processing job request", httpInvocationException); throw httpInvocationException; } |