From 4457cd8d70d4cc180f0c5a8d897db6746212ea0c Mon Sep 17 00:00:00 2001 From: Karsten Bruhns Date: Thu, 4 Apr 2024 11:22:56 +0200 Subject: [PATCH] feat(api): remove instance from problem message --- .../api/RestResponseEntityExceptionHandler.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/main/java/de/telekom/horizon/starlight/api/RestResponseEntityExceptionHandler.java b/src/main/java/de/telekom/horizon/starlight/api/RestResponseEntityExceptionHandler.java index 777ca2a..70ae958 100644 --- a/src/main/java/de/telekom/horizon/starlight/api/RestResponseEntityExceptionHandler.java +++ b/src/main/java/de/telekom/horizon/starlight/api/RestResponseEntityExceptionHandler.java @@ -7,8 +7,6 @@ import de.telekom.eni.pandora.horizon.model.common.ProblemMessage; import de.telekom.horizon.starlight.exception.*; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationContext; import org.springframework.http.*; import org.springframework.lang.Nullable; import org.springframework.security.core.AuthenticationException; @@ -26,13 +24,6 @@ public class RestResponseEntityExceptionHandler extends ResponseEntityExceptionH public static final String HORIZON_PUBLISH_EVENTS_DOC_URL = "https://developer.telekom.de/docs/src/tardis_customer_handbook/horizon/step-by-step-guide/Publish_Events/#sending-events"; public static final String DEFAULT_ERROR_TITLE = "Something went wrong."; - private final ApplicationContext applicationContext; - - @Autowired - public RestResponseEntityExceptionHandler(ApplicationContext applicationContext) { - this.applicationContext = applicationContext; - } - // 202 Accepted @ExceptionHandler(value = { UnknownEventTypeOrNoSubscriptionException.class @@ -141,7 +132,6 @@ private ResponseEntity responseEntityForException(Exception e, HttpStatu var message = new ProblemMessage(HORIZON_PUBLISH_EVENTS_DOC_URL, title); message.setStatus(status.value()); - message.setInstance(applicationContext.getId()); if (StringUtils.hasText(detail)) { message.setDetail(detail);