Interrupting a Stream Effect on Reaching a Certain Number of Errors

Hey dear Community, is there any way to interrupt an effect if a certain number of errors was reached? I'm using Streams and validating the elements with Schema and I want to stop the consumption of the stream if a number of decoding errors was reached.. any help is much appreciated!!
Was this page helpful?