Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Fix post merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Lionel Montrieux committed Oct 16, 2018
1 parent 9ac673c commit 3921ea7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -121,13 +120,6 @@ public ResponseEntity<Problem> handleBadRequestResponses(final NakadiBaseExcepti
return create(Problem.valueOf(BAD_REQUEST, exception.getMessage()), request);
}

@ExceptionHandler(LimitReachedException.class)
public ResponseEntity<Problem> 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<Problem> handleNakadiBaseException(final NakadiBaseException exception,
final NativeWebRequest request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -35,11 +33,4 @@ public ResponseEntity<Problem> handleInconsistentStateExcetpion(final Inconsiste
LOG.error(exception.getMessage(), exception);
return create(Problem.valueOf(SERVICE_UNAVAILABLE, exception.getMessage()), request);
}

@ExceptionHandler(TimeLagStatsTimeoutException.class)
public ResponseEntity<Problem> handleTimeLagStatsTimeoutException(final TimeLagStatsTimeoutException exception,
final NativeWebRequest request) {
LOG.warn(exception.getMessage());
return create(Problem.valueOf(REQUEST_TIMEOUT, exception.getMessage()), request);
}
}

0 comments on commit 3921ea7

Please sign in to comment.