Functional route support
I am using Spring Webflux with functional routes in Kotlin. When following the steps to configure Zalando Problem for WebFlux, and throw a Problem in my handler, the error response is the default Spring Boot response instead of the expected Problem response.
I'm not sure why this is the case, or if I'm missing something. I created a repository that contains a minimal example
Edit: I mistakenly linked to the wrong repo, which I fixed
Functional routes are currently not supported by this lib.
Is this something to be expected in a future release? The handle method in the ProblemExceptionHandler currently checks if the throwable is an instance of ResponseStatusException, and if so transforms this to an ResponseEntity<Problem>>. With my limited knowledge of the source code, would adding an additional condition that verifies that the throwable is an instance of Problem solve my problem?
That would probably work. Ultimately the best would be to check if a registered ExceptionHandler can handle the exception like what is done with Controller advice.
I've done something similar here. Maybe that could be done for that also.
That would solve the problem indeed! Any idea when it will be merged?
#400 is missing some coverage, if I'm not mistaken
I know 😰. Note that it won't fix this issue. It's just related.
It would right, the updated handle method would now search for the corresponding default interface method that can handle that specific exception, and invoke it.