I am trying to use Webflux to stream a generated file to another location, however, if the generation of the file ran into an error, the api returns success, but with a DTO
As stated in the most voted answer, one should never block. In my case, that is the only option as we are using a reactive library within an imperative piece of code. The blocking can be done by wrapping the mono in a processor: