diff options
author | Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> | 2024-05-23 13:30:37 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2024-05-23 13:30:37 +0000 |
commit | b74095873ab92c49e88c546f31d0b05b0279b13e (patch) | |
tree | 2bc847db9b7b53c9d80a20466dbe2a9252a18ee9 /aai-resources/src/main | |
parent | 85c9d0e95cd96e4f9f5b390b3807432a52e85479 (diff) | |
parent | 843834cb8c2c8184607270e4a01c9c3af2d0313e (diff) |
Merge "Improve tests for exception handling"
Diffstat (limited to 'aai-resources/src/main')
3 files changed, 100 insertions, 0 deletions
diff --git a/aai-resources/src/main/java/org/onap/aai/entities/AAIErrorResponse.java b/aai-resources/src/main/java/org/onap/aai/entities/AAIErrorResponse.java new file mode 100644 index 0000000..eeaecd4 --- /dev/null +++ b/aai-resources/src/main/java/org/onap/aai/entities/AAIErrorResponse.java @@ -0,0 +1,32 @@ +/** + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2024 Deutsche Telekom. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.aai.entities; + +import lombok.Builder; +import lombok.Data; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@Jacksonized +public class AAIErrorResponse { + private final RequestError requestError; +} diff --git a/aai-resources/src/main/java/org/onap/aai/entities/RequestError.java b/aai-resources/src/main/java/org/onap/aai/entities/RequestError.java new file mode 100644 index 0000000..3fb051b --- /dev/null +++ b/aai-resources/src/main/java/org/onap/aai/entities/RequestError.java @@ -0,0 +1,32 @@ +/** + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2024 Deutsche Telekom. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.aai.entities; + +import lombok.Builder; +import lombok.Data; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@Jacksonized +public class RequestError { + private ServiceException serviceException; +} diff --git a/aai-resources/src/main/java/org/onap/aai/entities/ServiceException.java b/aai-resources/src/main/java/org/onap/aai/entities/ServiceException.java new file mode 100644 index 0000000..38075c0 --- /dev/null +++ b/aai-resources/src/main/java/org/onap/aai/entities/ServiceException.java @@ -0,0 +1,36 @@ +/** + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2024 Deutsche Telekom. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.aai.entities; + +import java.util.List; + +import lombok.Builder; +import lombok.Data; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@Jacksonized +public class ServiceException { + private String messageId; + private String text; + private List<String> variables; +} |