Interface AdviceTrait

    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create​(Throwable throwable, org.springframework.web.context.request.NativeWebRequest request)
      Creates a problem response for the given throwable by taking any ResponseStatus annotation on the exception type or one of the causes into account.
      default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create​(Throwable throwable, org.zalando.problem.Problem problem, org.springframework.web.context.request.NativeWebRequest request)  
      default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create​(Throwable throwable, org.zalando.problem.Problem problem, org.springframework.web.context.request.NativeWebRequest request, org.springframework.http.HttpHeaders headers)  
      default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create​(org.zalando.problem.StatusType status, Throwable throwable, org.springframework.web.context.request.NativeWebRequest request)  
      default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create​(org.zalando.problem.StatusType status, Throwable throwable, org.springframework.web.context.request.NativeWebRequest request, URI type)  
      default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create​(org.zalando.problem.StatusType status, Throwable throwable, org.springframework.web.context.request.NativeWebRequest request, org.springframework.http.HttpHeaders headers)  
      default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create​(org.zalando.problem.StatusType status, Throwable throwable, org.springframework.web.context.request.NativeWebRequest request, org.springframework.http.HttpHeaders headers, URI type)  
      default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create​(org.zalando.problem.ThrowableProblem problem, org.springframework.web.context.request.NativeWebRequest request)  
      default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create​(org.zalando.problem.ThrowableProblem problem, org.springframework.web.context.request.NativeWebRequest request, org.springframework.http.HttpHeaders headers)  
      default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> fallback​(Throwable throwable, org.zalando.problem.Problem problem, org.springframework.web.context.request.NativeWebRequest request, org.springframework.http.HttpHeaders headers)  
      default void log​(Throwable throwable, org.zalando.problem.Problem problem, org.springframework.web.context.request.NativeWebRequest request, org.springframework.http.HttpStatus status)  
      default Optional<org.springframework.http.MediaType> negotiate​(org.springframework.web.context.request.NativeWebRequest request)  
      default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> process​(org.springframework.http.ResponseEntity<org.zalando.problem.Problem> entity, org.springframework.web.context.request.NativeWebRequest request)  
    • Method Detail

      • create

        default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create​(Throwable throwable,
                                                                                            org.springframework.web.context.request.NativeWebRequest request)
        Creates a problem response for the given throwable by taking any ResponseStatus annotation on the exception type or one of the causes into account.
        Parameters:
        throwable - exception being caught
        request - incoming request
        Returns:
        the problem response
      • create

        default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create​(org.zalando.problem.StatusType status,
                                                                                            Throwable throwable,
                                                                                            org.springframework.web.context.request.NativeWebRequest request)
      • create

        default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create​(org.zalando.problem.StatusType status,
                                                                                            Throwable throwable,
                                                                                            org.springframework.web.context.request.NativeWebRequest request,
                                                                                            org.springframework.http.HttpHeaders headers)
      • create

        default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create​(org.zalando.problem.StatusType status,
                                                                                            Throwable throwable,
                                                                                            org.springframework.web.context.request.NativeWebRequest request,
                                                                                            URI type)
      • create

        default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create​(org.zalando.problem.StatusType status,
                                                                                            Throwable throwable,
                                                                                            org.springframework.web.context.request.NativeWebRequest request,
                                                                                            org.springframework.http.HttpHeaders headers,
                                                                                            URI type)
      • create

        default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create​(org.zalando.problem.ThrowableProblem problem,
                                                                                            org.springframework.web.context.request.NativeWebRequest request)
      • create

        default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create​(org.zalando.problem.ThrowableProblem problem,
                                                                                            org.springframework.web.context.request.NativeWebRequest request,
                                                                                            org.springframework.http.HttpHeaders headers)
      • create

        default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create​(Throwable throwable,
                                                                                            org.zalando.problem.Problem problem,
                                                                                            org.springframework.web.context.request.NativeWebRequest request)
      • create

        default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create​(Throwable throwable,
                                                                                            org.zalando.problem.Problem problem,
                                                                                            org.springframework.web.context.request.NativeWebRequest request,
                                                                                            org.springframework.http.HttpHeaders headers)
      • log

        default void log​(Throwable throwable,
                         org.zalando.problem.Problem problem,
                         org.springframework.web.context.request.NativeWebRequest request,
                         org.springframework.http.HttpStatus status)
      • negotiate

        default Optional<org.springframework.http.MediaType> negotiate​(org.springframework.web.context.request.NativeWebRequest request)
      • fallback

        default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> fallback​(Throwable throwable,
                                                                                              org.zalando.problem.Problem problem,
                                                                                              org.springframework.web.context.request.NativeWebRequest request,
                                                                                              org.springframework.http.HttpHeaders headers)
      • process

        default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> process​(org.springframework.http.ResponseEntity<org.zalando.problem.Problem> entity,
                                                                                             org.springframework.web.context.request.NativeWebRequest request)