Skip to content

Commit

Permalink
Renaming Error Handler class
Browse files Browse the repository at this point in the history
  • Loading branch information
tscz committed Aug 18, 2019
1 parent 4c2b8f9 commit 3f4000f
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,23 @@
import org.springframework.web.bind.annotation.RestController;
import org.zalando.problem.Problem;
import org.zalando.problem.ThrowableProblem;
import org.zalando.problem.spring.web.advice.AdviceTrait;
import org.zalando.problem.spring.web.advice.ProblemHandling;
import org.zalando.problem.spring.web.advice.security.SecurityAdviceTrait;

/**
* Overrides default error controller from spring, because Exceptions thrown in
* {@link javax.servlet.Filter} are not handled in
* {@link org.springframework.web.bind.annotation.ExceptionHandler}.
* Error Handling for Spring Boot App:
*
* <li>Overrides default error controller from spring, because Exceptions thrown
* in {@link javax.servlet.Filter} are not handled in
* {@link org.springframework.web.bind.annotation.ExceptionHandler}.</li>
*
* <li>Add {@link ExceptionHandler}s, which are implementing
* {@link https://tools.ietf.org/html/rfc7807} for standardized
* application/problem+json rest responses. based on</li>
*/
@RestController
@ControllerAdvice
public class CustomErrorController implements ErrorController, AdviceTrait, ProblemHandling, SecurityAdviceTrait {
public class ErrorHandling implements ErrorController, ProblemHandling, SecurityAdviceTrait {

@RequestMapping(value = "/error")
Problem error(HttpServletRequest request, HttpServletResponse response) throws Throwable {
Expand Down

0 comments on commit 3f4000f

Please sign in to comment.