reactor.core.Exceptions$BubblingException: org.springframework.web.client.reactive.WebClientException: Could not decode response body of type 'text/event-stream' with target type 'com.codependent.spring5.playground.reactive.dto.Alert'

Stack Overflow | codependent | 4 months ago
  1. 0

    Spring 5 Web Reactive Programming - WebClient ClassCastException when unmarshalling JSON from Spring Reactive Controller that streams data

    Stack Overflow | 4 months ago | codependent
    reactor.core.Exceptions$BubblingException: org.springframework.web.client.reactive.WebClientException: Could not decode response body of type 'text/event-stream' with target type 'com.codependent.spring5.playground.reactive.dto.Alert'

    Root Cause Analysis

    1. org.springframework.web.client.reactive.WebClientException

      Could not decode response body of type 'text/event-stream' with target type 'com.codependent.spring5.playground.reactive.dto.Alert'

      at org.springframework.web.client.reactive.ResponseExtractors.lambda$resolveMessageReader$23()
    2. org.springframework.web
      ResponseExtractors.lambda$resolveMessageReader$23
      1. org.springframework.web.client.reactive.ResponseExtractors.lambda$resolveMessageReader$23(ResponseExtractors.java:203)
      1 frame