I'm having trouble extracting a minimized reproducer. When I try 'simple' 
examples everything works correctly.

Here's one weird thing I _can_ see: One subgraph I create now looks 
something like this:
final FlowShape<RequestContext<NodeT>, ResponseContext<NodeT>> 
responseStage =
                in_builder.add(log(Flow.<RequestContext<NodeT>>create()
                    .map(reqCtxt -> Pair.create(createHttpRequest(reqCtxt.
Request), reqCtxt))
                    .via(log(in_requestToResponseFlow, 
"RequestToResponseInner"))
                    .map(pair -> new ResponseContext<NodeT>(pair.second(), 
decode(pair.first().get()), getErrorHandler().create())), 
"RequestToResponseOuter"));

where 'log' is defined as

private static <A, B, C> Flow<A, B, C> log(Flow<A, B, C> in_toLog, String 
in_name)
    {
        return in_toLog.log(in_name).withAttributes(ActorAttributes.
createLogLevels(Logging.InfoLevel(), Logging.InfoLevel(), Logging.ErrorLevel
()));
    }

and in my test, the flow's upstream fails (since I throw an exception from 
a custom graph stage onPull()), then I see the following messages logged 
(among others)

[QuickStart-akka.actor.default-dispatcher-2] INFO akka.stream.Materializer - 
[RequestToResponseOuter] Downstream finished.
[QuickStart-akka.actor.default-dispatcher-2] ERROR akka.stream.Materializer 
- [RequestToResponseInner] Upstream failed.

I don't expect to see the first message there...

When I do something similar 

Source.<String>failed(new RuntimeException("FAILURE")).via(log(Flow.of(
String.class).map(f -> f).via(log(Flow.of(String.class).map(f -> f), "inner"
)), "outer")).toMat(Sink.ignore(), Keep.right()).run(materializer).
toCompletableFuture().get();

I just get

[QuickStart-akka.actor.default-dispatcher-3] ERROR akka.stream.Materializer 
- [inner] Upstream failed.
[QuickStart-akka.actor.default-dispatcher-3] ERROR akka.stream.Materializer 
- [outer] Upstream failed.

(which actually makes sense!)


On Wednesday, September 20, 2017 at 6:11:36 PM UTC-7, Konrad Malawski wrote:
>
> It all depends on exactly what operations you’re doing… Please share a 
> minimised reproducer so we could advice.
> Error handling works as documented and is “forward propagated” through a 
> stream, and operators are free to handle it in any way they want.
>
> —
> Konrad `kto.so` Malawski
> Akka <http://akka.io> @ Lightbend <http://lightbend.com>
>
> On 20 September 2017 at 11:49:58, Bwmat (bwmat.r...@gmail.com 
> <javascript:>) wrote:
>
> I'm doing a PoC in akka streams, and I just had to track down a case where 
> the mapping functor in an instance of Flow.map() threw an exception. This 
> seems to simply close the stream, but _not_ report it anywhere. Other 
> stages were getting completed implicitly because of it, but the error 
> didn't seem to propagate.
>
> The end of my graph was a SinkQueueWithCancel created with Sink.queue(), 
> and I had a thread blocked in a call to 
> sinkQueue.pull().toCompletableFuture().get(). I would have expected the 
> graph's failure to cause this to throw?
>
> Also, I had logging set up as described in 
> https://groups.google.com/forum/#!topic/akka-user/rJHu7C8D3KQ , but I 
> didn't see any messages about an uncaught exception, which I would have 
> expected. (makes me think even more that I messed up the configuration 
> somehow?)
>
> Thanks,
> Matthew w.
> --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ: 
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups 
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to akka-user+...@googlegroups.com <javascript:>.
> To post to this group, send email to akka...@googlegroups.com 
> <javascript:>.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to