From 3921ea7ea9b7c48eed863b618ac9645acf052f98 Mon Sep 17 00:00:00 2001 From: Lionel Montrieux Date: Tue, 16 Oct 2018 13:35:06 +0200 Subject: [PATCH] Fix post merge --- .../controller/advice/NakadiProblemExceptionHandler.java | 8 -------- .../controller/advice/SubscriptionExceptionHandler.java | 9 --------- 2 files changed, 17 deletions(-) diff --git a/src/main/java/org/zalando/nakadi/controller/advice/NakadiProblemExceptionHandler.java b/src/main/java/org/zalando/nakadi/controller/advice/NakadiProblemExceptionHandler.java index e84af4919e..1bc0506d94 100644 --- a/src/main/java/org/zalando/nakadi/controller/advice/NakadiProblemExceptionHandler.java +++ b/src/main/java/org/zalando/nakadi/controller/advice/NakadiProblemExceptionHandler.java @@ -40,7 +40,6 @@ import static org.zalando.problem.Status.NOT_FOUND; import static org.zalando.problem.Status.NOT_IMPLEMENTED; import static org.zalando.problem.Status.SERVICE_UNAVAILABLE; -import static org.zalando.problem.Status.TOO_MANY_REQUESTS; import static org.zalando.problem.Status.UNPROCESSABLE_ENTITY; @Priority(20) @@ -121,13 +120,6 @@ public ResponseEntity handleBadRequestResponses(final NakadiBaseExcepti return create(Problem.valueOf(BAD_REQUEST, exception.getMessage()), request); } - @ExceptionHandler(LimitReachedException.class) - public ResponseEntity handleLimitReachedException( - final ServiceTemporarilyUnavailableException exception, final NativeWebRequest request) { - LOG.debug(exception.getMessage()); - return create(Problem.valueOf(TOO_MANY_REQUESTS, exception.getMessage()), request); - } - @ExceptionHandler(NakadiBaseException.class) public ResponseEntity handleNakadiBaseException(final NakadiBaseException exception, final NativeWebRequest request) { diff --git a/src/main/java/org/zalando/nakadi/controller/advice/SubscriptionExceptionHandler.java b/src/main/java/org/zalando/nakadi/controller/advice/SubscriptionExceptionHandler.java index 99179a9129..125e3c2e02 100644 --- a/src/main/java/org/zalando/nakadi/controller/advice/SubscriptionExceptionHandler.java +++ b/src/main/java/org/zalando/nakadi/controller/advice/SubscriptionExceptionHandler.java @@ -7,13 +7,11 @@ import org.zalando.nakadi.controller.SubscriptionController; import org.zalando.nakadi.exceptions.runtime.ErrorGettingCursorTimeLagException; import org.zalando.nakadi.exceptions.runtime.InconsistentStateException; -import org.zalando.nakadi.exceptions.runtime.TimeLagStatsTimeoutException; import org.zalando.problem.Problem; import org.zalando.problem.spring.web.advice.AdviceTrait; import javax.annotation.Priority; -import static org.zalando.problem.Status.REQUEST_TIMEOUT; import static org.zalando.problem.Status.SERVICE_UNAVAILABLE; import static org.zalando.problem.Status.UNPROCESSABLE_ENTITY; @@ -35,11 +33,4 @@ public ResponseEntity handleInconsistentStateExcetpion(final Inconsiste LOG.error(exception.getMessage(), exception); return create(Problem.valueOf(SERVICE_UNAVAILABLE, exception.getMessage()), request); } - - @ExceptionHandler(TimeLagStatsTimeoutException.class) - public ResponseEntity handleTimeLagStatsTimeoutException(final TimeLagStatsTimeoutException exception, - final NativeWebRequest request) { - LOG.warn(exception.getMessage()); - return create(Problem.valueOf(REQUEST_TIMEOUT, exception.getMessage()), request); - } }