Skip to content

Commit

Permalink
feat(api): remove instance from problem message
Browse files Browse the repository at this point in the history
  • Loading branch information
ledex committed Apr 4, 2024
1 parent 2a82409 commit 4457cd8
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -141,7 +132,6 @@ private ResponseEntity<Object> 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);
Expand Down

0 comments on commit 4457cd8

Please sign in to comment.