Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-14876

Wrong HandlerResultHandler select when dealing with exceptions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 5.0 M2
    • Fix Version/s: 5.0 M3
    • Component/s: Reactive
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      In some cases, the wrong `HandlerResultHandler` can be resolved when handling exceptions; this can happen only if the original handler and exception handler have different signatures:

      Publisher<String> originalHandler() { ... }
      
      @ExceptionHandler(MyCustomException.class)
      ResponseEntity<Mono<String>> handleException() { ... }
      

      In that case, the `ResponseBodyResultHandler` will be used when handling exceptions instead of the `ResponseEntityResultHandler`.

        Attachments

          Activity

            People

            Assignee:
            bclozel Brian Clozel
            Reporter:
            bclozel Brian Clozel
            Last updater:
            Spring Issues
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              2 years, 29 weeks, 1 day ago