title: Dealing with errors using idiomatic Scala
body: <p>I'm writing an HTTPS service for a chat bot and find myself dealing with a lot of Futures and Options. Usually if an Option returns None or a Future fails I want to log the exception and reset the user back to the start. Here's a toy example of how I accomplish this:</p>
  
  <pre><code>(for {
    user &lt;- userService.retrieve(userId)
    userPet &lt;- Future(user.userPet.get)
    _ &lt;- sendTextAsJson(s"You're holding a $userPet!")
  } yield {}).recover {
    case ex: Exception =&gt;
      log.error(ex.toString)
      fail
  }
  </code></pre>
  
  <p>This works fine but it feels a little weird to wrap things in Future just so their exceptions are swallowed and dealt with in the recover block. It also feels weird to include an empty yield block. Is there a better way?</p>