Activity Spec - Change Error Response Structure 11/40511/3
authorsheetalm <sheetal.mudholkar@amdocs.com>
Mon, 2 Apr 2018 12:42:54 +0000 (18:12 +0530)
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>
Tue, 10 Apr 2018 14:37:17 +0000 (14:37 +0000)
commit40bd5b855df62e257e4cc2810a95248bc3426302
tree518cff1b6aaf972a3f06066f8e47ac1a5e65bfee
parent7a9073719da3db83024e66a1da9ba14546cfd175
Activity Spec - Change Error Response Structure

1 Added ActivitySpecNotFoundException to map to 404 Not Found response code
2 404 Not Found response code will only be returned in case activity spec
  does not exists irrespective of GET or PUT used in REST
3 Update flow test to check error messages
4 Error Response to have only "message" now
5 Use proper response code instead of EXPECTATION_FAILED

Change-Id: I82fb3c0970f4e9416d9fe2577174dcaf0a4fef92
Issue-ID: SDC-1048
Signed-off-by: sheetalm <sheetal.mudholkar@amdocs.com>
openecomp-bdd/features/ActivitySpec/TestCreate.feature
openecomp-bdd/features/ActivitySpec/TestInvalidStatusTransition.feature
services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/be/impl/ActivitySpecManagerImpl.java
services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/errors/ActivitySpecErrorResponse.java
services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/errors/ActivitySpecNotFoundException.java [new file with mode: 0644]
services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/errors/DefaultExceptionMapper.java
services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/openecomp/activityspec/utils/ActivitySpecConstant.java
services/activity-spec/activity-spec-web/activity-spec-service/src/test/java/org/openecomp/activityspec/be/impl/ActivitySpecManagerImplTest.java