Hey guys,
Let’s say we have any flow and during processing, an exception occurs because of an element.
Is it possible to get the element itself to handle the exception?
I’m aware of flow.mapError()
to transform exceptions and also flow.recover()
to map an exception to an element of the stream. Exceptions may occur also because of side effects, which are independent to the stream, but sometimes not.
Sometimes the causing element would be very interesting for handling the error. Is there any option to get the last element? Maybe a special buffer flow could handle that.
2 posts - 2 participants