 <pre><code>case Success(f) =&gt; case Failure(e: ExceptionType1) =&gt; case Failure(e: ExceptionType2) =&gt; case Failure(e) =&gt; // other </code></pre> <p>or</p> <pre><code>case Success(f) =&gt; case Failure(e) =&gt; e match { case e1: ExceptionType1 =&gt; case e2: ExceptioNType2 =&gt; case _ =&gt; } </code></pre>