title: Spring Webflux WebExceptionHandler not being Triggered by OptimisticLockingFailure
body: <p>I have a GlobalExceptionHandler to catch all exceptions thrown and return a correct return code.
  Everything works except when an OptimisticLockingFailureException happens and I have no clue why this is.</p>
  
  <p>GlobalExceptionHandler:</p>
  
  <pre><code>@Component
  @Order(-2)
  class GlobalExceptionHandler : WebExceptionHandler {
  
      override fun handle(exchange: ServerWebExchange, throwable: Throwable): Mono&lt;Void&gt; = handleException(throwable)
              .flatMap { it.writeTo(exchange, HandlerStrategiesResponseContext(HandlerStrategies.withDefaults())) }
              .flatMap { Mono.empty&lt;Void&gt;() }
  
      private fun handleException(ex: Throwable): Mono&lt;ServerResponse&gt; = when (ex) {
          is EntityNotFoundException -&gt; notFound(ex.message)
          is InvalidRequestException,
          is ReferenceKeyNotKnown,
          is InvalidContractTypeException -&gt; badRequest(ex.message)
          is DuplicateKeyException,
          is TransactionException,
          is OptimisticLockingFailureException -&gt; conflict(ex.message)
          else -&gt; errorResponse(HttpStatus.INTERNAL_SERVER_ERROR, ex.message)
      }
  
      private class HandlerStrategiesResponseContext(val strategies: HandlerStrategies) : ServerResponse.Context {
          override fun viewResolvers(): MutableList&lt;ViewResolver&gt; = strategies.viewResolvers()
          override fun messageWriters(): MutableList&lt;HttpMessageWriter&lt;*&gt;&gt; = strategies.messageWriters()
      }
  
  }
  </code></pre>
  
  <p>the notFound, badRequest and errorResponse functions return a Mono with the correct statuscode and message.</p>
  
  <p>Anyone that can help me out and point me in the right direction on why this isn't being triggered by the OptimistickLockingException?</p>
  
  <p>Thx!</p>