Small fixes after dependency uplift for spring and logback 01/139901/2
authoradheli.tavares <adheli.tavares@est.tech>
Tue, 14 Jan 2025 14:16:30 +0000 (14:16 +0000)
committeradheli.tavares <adheli.tavares@est.tech>
Wed, 15 Jan 2025 10:32:19 +0000 (10:32 +0000)
Issue-ID: POLICY-5235
Change-Id: I01f85ebc53948ffdd78e26c0c5e1bb6e55157142
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
main/pom.xml
main/src/main/java/org/onap/policy/api/main/rest/CommonRestController.java

index 86be769..eb279e8 100644 (file)
@@ -4,7 +4,7 @@
    Modified Copyright (C) 2018 Samsung Electronics Co., Ltd.
    Copyright (C) 2019,2021 AT&T Intellectual Property. All rights reserved.
    Modifications Copyright (C) 2020-2023 Bell Canada.
-   Modifications Copyright (C) 2022-2024 Nordix Foundation.
+   Modifications Copyright (C) 2022-2025 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
             <artifactId>micrometer-registry-prometheus</artifactId>
             <scope>runtime</scope>
         </dependency>
-        <dependency>
-            <groupId>io.netty</groupId>
-            <artifactId>netty-codec</artifactId>
-            <scope>runtime</scope>
-        </dependency>
         <dependency>
             <groupId>org.hibernate.orm</groupId>
             <artifactId>hibernate-core</artifactId>
index 97fdb24..ec4dfe2 100644 (file)
@@ -4,7 +4,7 @@
  * ================================================================================\r
  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.\r
  * Modifications Copyright (C) 2022 Bell Canada. All rights reserved.\r
- * Modifications Copyright (C) 2022-2024 Nordix Foundation.\r
+ * Modifications Copyright (C) 2022-2025 Nordix Foundation.\r
  * ================================================================================\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
@@ -132,7 +132,7 @@ public class CommonRestController {
 \r
     @ExceptionHandler(value = {PolicyApiRuntimeException.class})\r
     protected ResponseEntity<Object> handleException(PolicyApiRuntimeException ex, WebRequest req) {\r
-        LOGGER.warn(ex.getMessage(), ex.getCause());\r
+        LOGGER.warn(ex.getErrorResponse().getErrorMessage(), ex.getCause());\r
         final var requestId = req.getHeader(CommonRestController.REQUEST_ID_NAME);\r
         final var status = ex.getErrorResponse().getResponseCode().getStatusCode();\r
         return CommonRestController.addLoggingHeaders(\r