title: Akka supervisor catch future Failure
body: <p>I'm trying to develop an application using Futures and Akka supervisors but when A future returns a Failure to an actor its supervisor is not getting the exception.</p>
  
  <p>Here's my code. </p>
  
  <p>1) Supervisor actor</p>
  
  <pre><code>class TransaccionActorSupervisor() extends Actor with ActorLogging {
  
    val actor: ActorRef = context.actorOf(Props[TransaccionActor].withRouter(RoundRobinPool(nrOfInstances = 5)), "transaccion-actor")
  
    def receive = {
      case msg: Any =&gt; actor forward msg
    }
  
    override val supervisorStrategy = OneForOneStrategy() {
      case exception =&gt;
        println("&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; IN SUPERVISOR &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;")
        Restart
    }
  
  }
  </code></pre>
  
  <p>Supervised actor</p>
  
  <pre><code>Class TransaccionActor() extends Actor with ActorLogging {
  
    implicit val _: ExecutionContext = context.dispatcher
    val transaccionAdapter = (new TransaccionComponentImpl with TransaccionRepositoryComponentImpl).adapter
  
    def receive = {
  
      case msg: GetTransaccionById =&gt;
        val currentSender: ActorRef = sender()
        transaccionAdapter.searchTransaction(msg.id).onComplete {
           case Success(transaction) =&gt; currentSender ! transaction
           case Failure(error) =&gt; throw error
        }
  
    }
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>Thank you all very much!</p>