title: Custom Supervision.Decider doesn't catch exception produced by ActorPublisher
body: <p>I'm building a library that is going to be used by 3rd-party. In one of my methods I return <code>Stream[Item]</code> that is asynchronously generated from result of paginated REST API call.</p>
  
  <p>I'm using my modification of <a href="https://github.com/MfgLabs/akka-stream-extensions/blob/master/commons/src/main/scala/internals/source/BulkPullerAsync.scala" rel="noreferrer">BulkPullerAsync</a>. My code is <a href="https://gist.github.com/cppexpert/a366bf3fbd34b53b2e4c" rel="noreferrer">here</a>.</p>
  
  <p>I want recipient of my stream to be able to handle errors. According to <a href="http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0/scala/stream-error.html" rel="noreferrer">documentation</a> I'm supposed to use custom <code>Supervision.Decider</code>.</p>
  
  <pre><code>val decider: Supervision.Decider = {
    case ex =&gt;
      ex.printStackTrace()
      Supervision.Stop
  }
  
  implicit val mat = ActorMaterializer(ActorMaterializerSettings(system).withSupervisionStrategy(decider))
  </code></pre>
  
  <p>Unfortunately it doesn't catch exceptions thrown in my ActionPublisher. I see it handled, <code>ActorPublisher.onError</code> is called but it doesn't reach <code>Supervision.Decider</code>. It works with simple Stream provided in documentation. </p>
  
  <p>Errors also don't reach actor if I use <code>Sink.actorRef</code>.</p>
  
  <p>What should I do ? I expect that users of my <code>Stream</code> should not depend on nature of its implementation.</p>
  
  <p><strong>UPD</strong>: And for the sake of experiment I tried following sample</p>
  
  <pre><code>val stream = Source(0 to 5).map(100 / _)
  stream.runWith(Sink.actorSubscriber(props))
  </code></pre>
  
  <p>In this case exception was caught by <code>Decider</code>.</p>
  
  <p><strong>UPD2</strong>: I tried to trick it by producing <code>Publisher</code> from different type of sources and then converting them back to <code>Source</code> expecting all errors to come to <code>Subscriber.onError</code> which does happen :) So apparently it's something wrong with mix ActorPublisher+Decider...</p>
  
  <p>Overall I think it's inconsistent behavior. I cannot use one mechanism for handling errors in <code>Stream</code>.</p>